Removed MarketingService

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk 2021-03-19 08:37:59 +01:00 committed by Roman Tsisyk
parent f4e13f9b43
commit 02f1cca716
23 changed files with 3 additions and 456 deletions

View file

@ -86,7 +86,6 @@ set(
com/mapswithme/platform/HttpUserAgent.cpp
com/mapswithme/platform/Language.cpp
com/mapswithme/platform/Localization.cpp
com/mapswithme/platform/MarketingService.cpp
com/mapswithme/platform/Platform.cpp
com/mapswithme/platform/PThreadImpl.cpp
com/mapswithme/platform/SecureStorage.cpp
@ -100,7 +99,6 @@ set(
com/mapswithme/util/Language.cpp
com/mapswithme/util/LoggerFactory.cpp
com/mapswithme/util/NetworkPolicy.cpp
com/mapswithme/util/statistics/PushwooshHelper.cpp
com/mapswithme/util/StringUtils.cpp
com/mapswithme/vulkan/android_vulkan_context_factory.cpp
)

View file

@ -1,17 +0,0 @@
#include "platform/marketing_service.hpp"
#include "Platform.hpp"
using namespace std;
void MarketingService::SendPushWooshTag(string const & tag)
{}
void MarketingService::SendPushWooshTag(string const & tag, string const & value)
{}
void MarketingService::SendPushWooshTag(string const & tag, vector<string> const & values)
{}
void MarketingService::SendMarketingEvent(string const & tag, map<string, string> const & params)
{}

View file

@ -1,30 +0,0 @@
#include "com/mapswithme/core/jni_helper.hpp"
#include "platform/platform.hpp"
extern "C"
{
JNIEXPORT void JNICALL
Java_com_mapswithme_util_statistics_PushwooshHelper_nativeProcessFirstLaunch(JNIEnv * env, jclass thiz)
{
GetPlatform().GetMarketingService().ProcessFirstLaunch();
}
JNIEXPORT void JNICALL
Java_com_mapswithme_util_statistics_PushwooshHelper_nativeSendEditorAddObjectTag(JNIEnv * env, jclass thiz)
{
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kEditorAddDiscovered);
}
JNIEXPORT void JNICALL
Java_com_mapswithme_util_statistics_PushwooshHelper_nativeSendEditorEditObjectTag(JNIEnv * env, jclass thiz)
{
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kEditorEditDiscovered);
}
JNIEXPORT jstring JNICALL
Java_com_mapswithme_util_statistics_PushwooshHelper_nativeGetFormattedTimestamp(JNIEnv * env, jclass thiz)
{
return jni::ToJavaString(env, GetPlatform().GetMarketingService().GetPushWooshTimestamp());
}
} // extern "C"

View file

@ -149,7 +149,6 @@ NSString *const kMapToCategorySelectorSegue = @"MapToCategorySelectorSegue";
}
- (void)addPlace {
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kEditorAddDiscovered);
[self addPlace:NO hasPoint:NO point:m2::PointD()];
}

View file

@ -447,8 +447,6 @@ using namespace osm_auth_ios;
[standartDefaults setInteger:1 forKey:kUDSessionsCountKey];
[standartDefaults setObject:NSDate.date forKey:kUDLastLaunchDateKey];
[standartDefaults synchronize];
GetPlatform().GetMarketingService().ProcessFirstLaunch();
}
- (void)incrementSessionCount {

View file

@ -173,7 +173,6 @@ void RegisterEventIfPossible(eye::MapObject::Event::Type const type)
- (void)editPlace
{
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kEditorEditDiscovered);
[self.ownerViewController openEditor];
}

View file

@ -609,8 +609,6 @@ Bookmark * BookmarkManager::CreateBookmark(kml::BookmarkData && bmData)
Bookmark * BookmarkManager::CreateBookmark(kml::BookmarkData && bm, kml::MarkGroupId groupId)
{
CHECK_THREAD_CHECKER(m_threadChecker, ());
GetPlatform().GetMarketingService().SendMarketingEvent(marketing::kBookmarksBookmarkAction,
{{"action", "create"}});
auto const & c = classif();
CHECK(c.HasTypesMapping(), ());
@ -3985,9 +3983,6 @@ void BookmarkManager::DeleteExpiredCategories()
serverIds += serverIds.empty() ? "" : "," + serverId;
}
auto const now = GetPlatform().GetMarketingService().GetPushWooshTimestamp();
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kSubscriptionContentDeleted, now);
}
void BookmarkManager::ResetExpiredCategories()

View file

@ -10,7 +10,6 @@
#include "partners_api/locals_api.hpp"
#include "partners_api/promo_api.hpp"
#include "platform/marketing_service.hpp"
#include "platform/platform.hpp"
#include "geometry/point2d.hpp"
@ -60,8 +59,6 @@ public:
template <typename ResultCallback>
uint32_t Discover(Params && params, ResultCallback const & onResult, ErrorCalback const & onError)
{
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kDiscoveryButtonDiscovered);
uint32_t const requestId = ++m_requestCounter;
CHECK_THREAD_CHECKER(m_threadChecker, ());
auto const & types = params.m_itemTypes;

View file

@ -3380,8 +3380,6 @@ bool Framework::CreateMapObject(m2::PointD const & mercator, uint32_t const feat
if (!mwmId.IsAlive())
return false;
GetPlatform().GetMarketingService().SendMarketingEvent(marketing::kEditorAddStart, {});
search::ReverseGeocoder const coder(m_featuresFetcher.GetDataSource());
vector<search::ReverseGeocoder::Street> streets;
@ -3404,8 +3402,6 @@ bool Framework::GetEditableMapObject(FeatureID const & fid, osm::EditableMapObje
if (!ft)
return false;
GetPlatform().GetMarketingService().SendMarketingEvent(marketing::kEditorEditStart, {});
emo = {};
emo.SetFromFeatureType(*ft);
auto const & editor = osm::Editor::Instance();

View file

@ -15,7 +15,6 @@
#include "indexer/scales.hpp"
#include "platform/http_client.hpp"
#include "platform/marketing_service.hpp"
#include "platform/platform.hpp"
#include "platform/preferred_languages.hpp"
#include "platform/settings.hpp"
@ -37,8 +36,6 @@ using namespace base;
namespace
{
std::array<char const * const, 5> const kMarketingParameters = {{marketing::kFrom, marketing::kType, marketing::kName,
marketing::kContent, marketing::kKeyword}};
std::string const kServerUrl = LOCAL_ADS_SERVER_URL;
std::string const kCampaignPageUrl = LOCAL_ADS_COMPANY_PAGE_URL;
@ -123,18 +120,7 @@ std::string MakeCampaignPageURL(FeatureID const & featureId)
ss << kCampaignPageUrl << "/" << featureId.m_mwmId.GetInfo()->GetVersion() << "/"
<< url::UrlEncode(featureId.m_mwmId.GetInfo()->GetCountryName()) << "/" << featureId.m_index;
url::Params params;
params.reserve(kMarketingParameters.size());
for (auto const & key : kMarketingParameters)
{
std::string value;
if (!marketing::Settings::Get(key, value))
continue;
params.push_back({key, value});
}
return url::Make(ss.str(), params);
return url::Make(ss.str(), {});
}
} // namespace

View file

@ -8,7 +8,6 @@
#include "drape_frontend/visual_params.hpp"
#include "platform/marketing_service.hpp"
#include "platform/settings.hpp"
#include "base/logging.hpp"
@ -22,12 +21,6 @@ namespace url_scheme
{
namespace lead
{
char const * kFrom = marketing::kFrom;
char const * kType = marketing::kType;
char const * kName = marketing::kName;
char const * kContent = marketing::kContent;
char const * kKeyword = marketing::kKeyword;
struct CampaignDescription
{
void Write() const
@ -37,16 +30,6 @@ struct CampaignDescription
LOG(LERROR, ("Invalid campaign description"));
return;
}
marketing::Settings::Set(kFrom, m_from);
marketing::Settings::Set(kType, m_type);
marketing::Settings::Set(kName, m_name);
if (!m_content.empty())
marketing::Settings::Set(kContent, m_content);
if (!m_keyword.empty())
marketing::Settings::Set(kKeyword, m_keyword);
}
bool IsValid() const { return !m_from.empty() && !m_type.empty() && !m_name.empty(); }
@ -246,19 +229,7 @@ bool ParsedMapApi::Parse(url::Url const & url, UrlType type)
m_request = request;
return true;
}
case UrlType::Lead:
{
lead::CampaignDescription description;
url.ForEachParam([&description, this](url::Param const & param) {
ParseLeadParam(param, description);
});
if (!description.IsValid())
return false;
description.Write();
return true;
}
case UrlType::Lead: break;
case UrlType::Catalogue:
{
Catalog item;
@ -470,25 +441,6 @@ void ParsedMapApi::ParseSearchParam(url::Param const & param, SearchRequest & re
}
}
void ParsedMapApi::ParseLeadParam(url::Param const & param, lead::CampaignDescription & description) const
{
using namespace lead;
string const & key = param.m_name;
string const & value = param.m_value;
if (key == kFrom)
description.m_from = value;
else if (key == kType)
description.m_type = value;
else if (key == kName)
description.m_name = value;
else if (key == kContent)
description.m_content = value;
else if (key == kKeyword)
description.m_keyword = value;
}
void ParsedMapApi::ParseCatalogParam(url::Param const & param, Catalog & item) const
{
using namespace catalogue;

View file

@ -120,7 +120,6 @@ private:
void ParseMapParam(url::Param const & param, std::vector<ApiPoint> & points, bool & correctOrder);
void ParseRouteParam(url::Param const & param, std::vector<std::string> & pattern);
void ParseSearchParam(url::Param const & param, SearchRequest & request) const;
void ParseLeadParam(url::Param const & param, lead::CampaignDescription & description) const;
void ParseCatalogParam(url::Param const & param, Catalog & item) const;
void ParseCatalogPathParam(url::Param const & param, CatalogPath & item) const;
void ParseSubscriptionParam(url::Param const & param, Subscription & item) const;

View file

@ -181,7 +181,7 @@ bool Purchase::IsSubscriptionActive(SubscriptionType type) const
return m_subscriptionData[base::Underlying(type)]->m_isActive;
}
void Purchase::SetSubscriptionEnabled(SubscriptionType type, bool isEnabled, bool isTrialActive)
void Purchase::SetSubscriptionEnabled(SubscriptionType type, bool isEnabled, bool /*isTrialActive*/)
{
CHECK(type != SubscriptionType::Count, ());
@ -194,31 +194,6 @@ void Purchase::SetSubscriptionEnabled(SubscriptionType type, bool isEnabled, boo
for (auto & listener : m_listeners)
listener->OnSubscriptionChanged(type, isEnabled);
auto const nowStr = GetPlatform().GetMarketingService().GetPushWooshTimestamp();
if (isTrialActive)
{
GetPlatform().GetMarketingService().SendPushWooshTag(
marketing::kSubscriptionBookmarksAllTrialEnabled, nowStr);
}
if (type == SubscriptionType::BookmarksSights)
{
GetPlatform().GetMarketingService().SendPushWooshTag(isEnabled ?
marketing::kSubscriptionBookmarksSightsEnabled :
marketing::kSubscriptionBookmarksSightsDisabled, nowStr);
}
else if (type == SubscriptionType::BookmarksAll)
{
GetPlatform().GetMarketingService().SendPushWooshTag(isEnabled ?
marketing::kSubscriptionBookmarksAllEnabled :
marketing::kSubscriptionBookmarksAllDisabled, nowStr);
}
else if (type == SubscriptionType::RemoveAds)
{
GetPlatform().GetMarketingService().SendPushWooshTag(isEnabled ?
marketing::kRemoveAdsSubscriptionEnabled :
marketing::kRemoveAdsSubscriptionDisabled, nowStr);
}
}
void Purchase::Validate(ValidationInfo const & validationInfo, std::string const & accessToken)

View file

@ -1046,34 +1046,6 @@ void RoutingManager::BuildRoute(uint32_t timeoutSec)
}
}
bool const isP2P = !routePoints.front().m_isMyPosition && !routePoints.back().m_isMyPosition;
// Send tag to Push Woosh.
{
string tag;
switch (m_currentRouterType)
{
case RouterType::Vehicle:
tag = isP2P ? marketing::kRoutingP2PVehicleDiscovered : marketing::kRoutingVehicleDiscovered;
break;
case RouterType::Pedestrian:
tag = isP2P ? marketing::kRoutingP2PPedestrianDiscovered
: marketing::kRoutingPedestrianDiscovered;
break;
case RouterType::Bicycle:
tag = isP2P ? marketing::kRoutingP2PBicycleDiscovered : marketing::kRoutingBicycleDiscovered;
break;
case RouterType::Taxi:
tag = isP2P ? marketing::kRoutingP2PTaxiDiscovered : marketing::kRoutingTaxiDiscovered;
break;
case RouterType::Transit:
tag = isP2P ? marketing::kRoutingP2PTransitDiscovered : marketing::kRoutingTransitDiscovered;
break;
case RouterType::Count: CHECK(false, ("Bad router type", m_currentRouterType));
}
GetPlatform().GetMarketingService().SendPushWooshTag(tag);
}
CallRouteBuildStart(routePoints);
if (IsRoutingActive())

View file

@ -103,14 +103,9 @@ void TrafficManager::SetEnabled(bool enabled)
m_drapeEngine.SafeCall(&df::DrapeEngine::EnableTraffic, enabled);
if (enabled)
{
Invalidate();
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kTrafficDiscovered);
}
else
{
m_observer.OnTrafficInfoClear();
}
}
void TrafficManager::Clear()

View file

@ -42,8 +42,6 @@ set(
localization.cpp
localization.hpp
location.hpp
marketing_service.cpp
marketing_service.hpp
measurement_utils.cpp
measurement_utils.hpp
mwm_traits.cpp
@ -80,7 +78,6 @@ if(${PLATFORM_IPHONE})
http_user_agent_ios.mm
localization.mm
locale.mm
marketing_service_ios.mm
network_policy_ios.h
network_policy_ios.mm
platform_ios.mm
@ -104,7 +101,6 @@ else() # neither iPhone nor Android
localization_dummy.cpp
location_service.cpp
location_service.hpp
marketing_service_dummy.cpp
network_policy_dummy.cpp
platform_qt.cpp
wifi_info.hpp
@ -120,7 +116,6 @@ else() # neither iPhone nor Android
http_thread_qt.hpp
http_uploader_background_dummy.cpp
http_uploader_dummy.cpp
marketing_service_dummy.cpp
platform_win.cpp
secure_storage_dummy.cpp
wifi_info_windows.cpp
@ -137,7 +132,6 @@ else() # neither iPhone nor Android
http_uploader_background_dummy.cpp
http_user_agent_dummy.cpp
locale.mm
marketing_service_dummy.cpp
platform_mac.mm
platform_unix_impl.cpp
platform_unix_impl.hpp
@ -157,7 +151,6 @@ else() # neither iPhone nor Android
http_uploader_background_dummy.cpp
http_user_agent_dummy.cpp
locale_linux.cpp
marketing_service_dummy.cpp
platform_linux.cpp
platform_unix_impl.cpp
platform_unix_impl.hpp

View file

@ -1,90 +0,0 @@
#include "platform/marketing_service.hpp"
#include "base/gmtime.hpp"
namespace marketing
{
// Tags.
char const * const kMapVersionMin = "map_version_min";
char const * const kMapVersionMax = "map_version_max";
char const * const kMapListing = "map_listing";
char const * const kMapDownloadDiscovered = "map_download_discovered";
char const * const kMapLastDownloaded = "last_map_downloaded";
char const * const kMapLastDownloadedTimestamp = "last_map_downloaded_time";
char const * const kRoutingP2PVehicleDiscovered = "routing_p2p_vehicle_discovered";
char const * const kRoutingP2PPedestrianDiscovered = "routing_p2p_pedestrian_discovered";
char const * const kRoutingP2PBicycleDiscovered = "routing_p2p_bicycle_discovered";
char const * const kRoutingP2PTaxiDiscovered = "routing_p2p_taxi_discovered";
char const * const kRoutingP2PTransitDiscovered = "routing_p2p_transit_discovered";
char const * const kRoutingVehicleDiscovered = "routing_vehicle_discovered";
char const * const kRoutingPedestrianDiscovered = "routing_pedestrian_discovered";
char const * const kRoutingBicycleDiscovered = "routing_bicycle_discovered";
char const * const kRoutingTaxiDiscovered = "routing_taxi_discovered";
char const * const kRoutingTransitDiscovered = "routing_transit_discovered";
char const * const kEditorAddDiscovered = "editor_add_discovered";
char const * const kEditorEditDiscovered = "editor_edit_discovered";
char const * const kTrafficDiscovered = "traffic_discovered";
char const * const kDiscoveryButtonDiscovered = "discovery_button_discovered";
char const * const kBookHotelOnBookingComDiscovered = "hotel_book_bcom_discovered";
char const * const kSubscriptionBookmarksAllEnabled =
"bookmark_catalog_subscription_city_outdoor_enabled";
char const * const kSubscriptionBookmarksAllDisabled =
"bookmark_catalog_subscription_city_outdoor_disabled";
char const * const kSubscriptionBookmarksSightsEnabled =
"bookmark_catalog_subscription_city_enabled";
char const * const kSubscriptionBookmarksSightsDisabled =
"bookmark_catalog_subscription_city_disabled";
char const * const kRemoveAdsSubscriptionEnabled = "remove_ads_subscription_enabled";
char const * const kRemoveAdsSubscriptionDisabled = "remove_ads_subscription_disabled";
char const * const kSubscriptionContentDeleted = "bookmark_catalog_subscription_content_deleted";
char const * const kSubscriptionBookmarksAllTrialEnabled =
"bookmark_catalog_subscription_city_outdoor_trial_enabled";
// Events.
char const * const kDownloaderMapActionFinished = "Downloader_Map_action_finished";
char const * const kSearchEmitResultsAndCoords = "searchEmitResultsAndCoords";
char const * const kBookmarksBookmarkAction = "Bookmarks_Bookmark_action";
char const * const kPlacepageHotelBook = "Placepage_Hotel_book";
char const * const kEditorAddStart = "EditorAdd_start";
char const * const kEditorEditStart = "EditorEdit_start";
// Settings.
char const * const kFrom = "utm_source";
char const * const kType = "utm_medium";
char const * const kName = "utm_campaign";
char const * const kContent = "utm_content";
char const * const kKeyword = "utm_term";
} // marketing
void MarketingService::ProcessFirstLaunch()
{
// Send initial value for "discovered" tags.
using namespace marketing;
std::vector<std::string> tags =
{
kMapDownloadDiscovered,
kRoutingP2PVehicleDiscovered, kRoutingP2PPedestrianDiscovered,
kRoutingP2PBicycleDiscovered, kRoutingP2PTaxiDiscovered,
kRoutingVehicleDiscovered, kRoutingPedestrianDiscovered,
kRoutingBicycleDiscovered, kRoutingTaxiDiscovered,
kRoutingP2PTransitDiscovered, kRoutingTransitDiscovered,
kEditorAddDiscovered, kEditorEditDiscovered,
kTrafficDiscovered,
kDiscoveryButtonDiscovered,
kBookHotelOnBookingComDiscovered
};
for (auto const & tag : tags)
SendPushWooshTag(tag, std::vector<std::string>{"0"});
}
std::string MarketingService::GetPushWooshTimestamp()
{
char nowStr[18]{};
auto const now = base::GmTime(time(nullptr));
strftime(nowStr, sizeof(nowStr), "%Y-%m-%d %H:%M", &now);
return std::string(nowStr);
}

View file

@ -1,85 +0,0 @@
#pragma once
#include <functional>
#include <map>
#include <string>
#include <utility>
#include <vector>
namespace marketing
{
// Tags.
extern char const * const kMapVersionMin;
extern char const * const kMapVersionMax;
extern char const * const kMapListing;
extern char const * const kMapDownloadDiscovered;
extern char const * const kMapLastDownloaded;
extern char const * const kMapLastDownloadedTimestamp;
extern char const * const kRoutingP2PVehicleDiscovered;
extern char const * const kRoutingP2PPedestrianDiscovered;
extern char const * const kRoutingP2PBicycleDiscovered;
extern char const * const kRoutingP2PTaxiDiscovered;
extern char const * const kRoutingP2PTransitDiscovered;
extern char const * const kRoutingVehicleDiscovered;
extern char const * const kRoutingPedestrianDiscovered;
extern char const * const kRoutingBicycleDiscovered;
extern char const * const kRoutingTaxiDiscovered;
extern char const * const kRoutingTransitDiscovered;
extern char const * const kEditorAddDiscovered;
extern char const * const kEditorEditDiscovered;
extern char const * const kTrafficDiscovered;
extern char const * const kDiscoveryButtonDiscovered;
extern char const * const kBookHotelOnBookingComDiscovered;
extern char const * const kSubscriptionBookmarksAllEnabled;
extern char const * const kSubscriptionBookmarksAllDisabled;
extern char const * const kSubscriptionBookmarksSightsEnabled;
extern char const * const kSubscriptionBookmarksSightsDisabled;
extern char const * const kRemoveAdsSubscriptionEnabled;
extern char const * const kRemoveAdsSubscriptionDisabled;
extern char const * const kSubscriptionContentDeleted;
extern char const * const kSubscriptionBookmarksAllTrialEnabled;
// Events.
extern char const * const kDownloaderMapActionFinished;
extern char const * const kSearchEmitResultsAndCoords;
extern char const * const kBookmarksBookmarkAction;
extern char const * const kPlacepageHotelBook;
extern char const * const kEditorAddStart;
extern char const * const kEditorEditStart;
// Settings.
extern char const * const kFrom;
extern char const * const kType;
extern char const * const kName;
extern char const * const kContent;
extern char const * const kKeyword;
} // marketing
class MarketingService
{
public:
using PushWooshSenderFn = std::function<void(std::string const & tag,
std::vector<std::string> const & values)>;
using MarketingSenderFn = std::function<void(std::string const & tag,
std::map<std::string, std::string> const & params)>;
void ProcessFirstLaunch();
void SetPushWooshSender(PushWooshSenderFn const & fn) { m_pushwooshSender = fn; }
void SendPushWooshTag(std::string const & tag);
void SendPushWooshTag(std::string const & tag, std::string const & value);
void SendPushWooshTag(std::string const & tag, std::vector<std::string> const & values);
std::string GetPushWooshTimestamp();
void SetMarketingSender(MarketingSenderFn const & fn) { m_marketingSender = fn; }
void SendMarketingEvent(std::string const & tag,
std::map<std::string, std::string> const & params);
private:
/// Callback fucntion for setting PushWoosh tags.
PushWooshSenderFn m_pushwooshSender;
/// Callback fucntion for sending marketing events.
MarketingSenderFn m_marketingSender;
};

View file

@ -1,15 +0,0 @@
#include "platform/marketing_service.hpp"
using namespace std;
void MarketingService::SendPushWooshTag(string const & tag)
{}
void MarketingService::SendPushWooshTag(string const & tag, string const & value)
{}
void MarketingService::SendPushWooshTag(string const & tag, vector<string> const & values)
{}
void MarketingService::SendMarketingEvent(string const & tag, map<string, string> const & params)
{}

View file

@ -1,23 +0,0 @@
#include "platform/marketing_service.hpp"
void MarketingService::SendPushWooshTag(std::string const & tag)
{
SendPushWooshTag(tag, std::vector<std::string>{"1"});
}
void MarketingService::SendPushWooshTag(std::string const & tag, std::string const & value)
{
SendPushWooshTag(tag, std::vector<std::string>{value});
}
void MarketingService::SendPushWooshTag(std::string const & tag, std::vector<std::string> const & values)
{
if (m_pushwooshSender)
m_pushwooshSender(tag, values);
}
void MarketingService::SendMarketingEvent(std::string const & tag, std::map<std::string, std::string> const & params)
{
if (m_marketingSender)
m_marketingSender(tag, params);
}

View file

@ -4,7 +4,6 @@
#include "platform/country_defines.hpp"
#include "platform/gui_thread.hpp"
#include "platform/http_user_agent.hpp"
#include "platform/marketing_service.hpp"
#include "platform/secure_storage.hpp"
#include "coding/reader.hpp"
@ -118,9 +117,6 @@ protected:
/// Returns last system call error as EError.
static EError ErrnoToError();
/// Platform-dependent marketing services.
MarketingService m_marketingService;
/// Platform-dependent secure storage.
platform::SecureStorage m_secureStorage;
@ -303,7 +299,6 @@ public:
void SetupMeasurementSystem() const;
MarketingService & GetMarketingService() { return m_marketingService; }
platform::SecureStorage & GetSecureStorage() { return m_secureStorage; }
platform::HttpUserAgent & GetAppUserAgent() { return m_appUserAgent; }
platform::HttpUserAgent const & GetAppUserAgent() const { return m_appUserAgent; }

View file

@ -8,7 +8,6 @@
#include "storage/storage_helpers.hpp"
#include "platform/local_country_file_utils.hpp"
#include "platform/marketing_service.hpp"
#include "platform/mwm_version.hpp"
#include "platform/platform.hpp"
#include "platform/preferred_languages.hpp"
@ -232,9 +231,6 @@ void Storage::RegisterAllLocalMaps(bool enableDiffs)
sort(localFiles.begin(), localFiles.end(), compareByCountryAndVersion);
int64_t minVersion = std::numeric_limits<int64_t>().max();
int64_t maxVersion = std::numeric_limits<int64_t>().min();
auto i = localFiles.begin();
while (i != localFiles.end())
{
@ -252,15 +248,6 @@ void Storage::RegisterAllLocalMaps(bool enableDiffs)
LocalCountryFile const & localFile = *i;
string const & name = localFile.GetCountryName();
if (name != WORLD_FILE_NAME && name != WORLD_COASTS_FILE_NAME)
{
auto const version = localFile.GetVersion();
if (version < minVersion)
minVersion = version;
if (version > maxVersion)
maxVersion = version;
}
CountryId countryId = FindCountryIdByFile(name);
if (IsLeaf(countryId))
RegisterCountryFiles(countryId, localFile.GetDirectory(), localFile.GetVersion());
@ -272,17 +259,6 @@ void Storage::RegisterAllLocalMaps(bool enableDiffs)
i = j;
}
if (minVersion > maxVersion)
{
minVersion = 0;
maxVersion = 0;
}
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kMapVersionMin,
strings::to_string(minVersion));
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kMapVersionMax,
strings::to_string(maxVersion));
FindAllDiffs(m_dataDir, m_notAppliedDiffs);
if (enableDiffs)
LoadDiffScheme();
@ -1355,12 +1331,6 @@ void Storage::OnFinishDownloading()
RetryDownloadNode(country);
}
});
CountriesVec localMaps;
GetLocalRealMaps(localMaps);
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kMapListing, localMaps);
if (!localMaps.empty())
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kMapDownloadDiscovered);
return;
}
void Storage::OnDiffStatusReceived(diffs::NameDiffInfoMap && diffs)

View file

@ -9,9 +9,6 @@
/* Begin PBXBuildFile section */
333A416F21C3E13B00AF26F6 /* http_session_manager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 333A416D21C3E13A00AF26F6 /* http_session_manager.mm */; };
333A417021C3E13B00AF26F6 /* http_session_manager.h in Headers */ = {isa = PBXBuildFile; fileRef = 333A416E21C3E13B00AF26F6 /* http_session_manager.h */; };
34513AFA1DCB37C100471BDA /* marketing_service_ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34513AF71DCB37C100471BDA /* marketing_service_ios.mm */; };
34513AFB1DCB37C100471BDA /* marketing_service.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34513AF81DCB37C100471BDA /* marketing_service.cpp */; };
34513AFC1DCB37C100471BDA /* marketing_service.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 34513AF91DCB37C100471BDA /* marketing_service.hpp */; };
34C624BD1DABCCD100510300 /* socket_apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34C624BB1DABCCD100510300 /* socket_apple.mm */; };
34C624BE1DABCCD100510300 /* socket.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 34C624BC1DABCCD100510300 /* socket.hpp */; };
3D061D1F243F5A6500DA45CB /* downloader_utils.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D061D1D243F5A6500DA45CB /* downloader_utils.hpp */; };
@ -145,9 +142,6 @@
333A416D21C3E13A00AF26F6 /* http_session_manager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = http_session_manager.mm; sourceTree = "<group>"; };
333A416E21C3E13B00AF26F6 /* http_session_manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = http_session_manager.h; sourceTree = "<group>"; };
344D8A2E204945D000CF532F /* platform_ios.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = platform_ios.h; sourceTree = "<group>"; };
34513AF71DCB37C100471BDA /* marketing_service_ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = marketing_service_ios.mm; sourceTree = "<group>"; };
34513AF81DCB37C100471BDA /* marketing_service.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = marketing_service.cpp; sourceTree = "<group>"; };
34513AF91DCB37C100471BDA /* marketing_service.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = marketing_service.hpp; sourceTree = "<group>"; };
34C624BB1DABCCD100510300 /* socket_apple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = socket_apple.mm; sourceTree = "<group>"; };
34C624BC1DABCCD100510300 /* socket.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = socket.hpp; sourceTree = "<group>"; };
34F558331DBF273C00A4FC11 /* common-debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "common-debug.xcconfig"; path = "../common-debug.xcconfig"; sourceTree = "<group>"; };
@ -457,9 +451,6 @@
675343951A3F5D5A00A0A8C3 /* location_service.cpp */,
675343961A3F5D5A00A0A8C3 /* location_service.hpp */,
675343971A3F5D5A00A0A8C3 /* location.hpp */,
34513AF71DCB37C100471BDA /* marketing_service_ios.mm */,
34513AF81DCB37C100471BDA /* marketing_service.cpp */,
34513AF91DCB37C100471BDA /* marketing_service.hpp */,
671C62041AE9014C00076BD0 /* measurement_utils.cpp */,
671C62051AE9014C00076BD0 /* measurement_utils.hpp */,
56EB1EDA1C6B6E6C0022D831 /* mwm_traits.cpp */,
@ -557,7 +548,6 @@
D50B2296238591570056820A /* http_payload.hpp in Headers */,
675343C11A3F5D5A00A0A8C3 /* location_service.hpp in Headers */,
67AB92DD1B7B3D7300AB5194 /* mwm_version.hpp in Headers */,
34513AFC1DCB37C100471BDA /* marketing_service.hpp in Headers */,
675343CA1A3F5D5A00A0A8C3 /* platform_unix_impl.hpp in Headers */,
675343D21A3F5D5A00A0A8C3 /* servers_list.hpp in Headers */,
675343BA1A3F5D5A00A0A8C3 /* http_thread_callback.hpp in Headers */,
@ -743,7 +733,6 @@
3D78156E1F3A14090068B6AC /* gui_thread_apple.mm in Sources */,
67247FFD1C60BD6500EDE56A /* writable_dir_changer.cpp in Sources */,
45D7ADBA210F48E500160DE3 /* http_user_agent.cpp in Sources */,
34513AFB1DCB37C100471BDA /* marketing_service.cpp in Sources */,
6741250C1B4C00CC00A3E828 /* local_country_file_utils.cpp in Sources */,
3D97F64B1D9C05E800380945 /* http_client.cpp in Sources */,
D593E50423CDBC5F004D6B89 /* http_uploader_background_dummy.cpp in Sources */,
@ -760,7 +749,6 @@
56EB1EDC1C6B6E6C0022D831 /* file_logging.cpp in Sources */,
675343B11A3F5D5A00A0A8C3 /* apple_location_service.mm in Sources */,
675343B31A3F5D5A00A0A8C3 /* chunks_download_strategy.cpp in Sources */,
34513AFA1DCB37C100471BDA /* marketing_service_ios.mm in Sources */,
675343C01A3F5D5A00A0A8C3 /* location_service.cpp in Sources */,
45D7ADBB210F48E500160DE3 /* http_user_agent_ios.mm in Sources */,
675343D31A3F5D5A00A0A8C3 /* settings.cpp in Sources */,