diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-01-16 14:54:23 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-01-16 14:54:23 +0300 |
commit | d87c8f5c5b300682f0560e01efc2489f6e97bf7b (patch) | |
tree | b4384a30b0b6feb988d07407cc3f734d0ed71a61 /storage | |
parent | 07dbaa9e81e71605c48d6006d1d4e455b75a4d0b (diff) |
Added new tags to PushWoosh
Diffstat (limited to 'storage')
-rw-r--r-- | storage/storage.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/storage/storage.cpp b/storage/storage.cpp index 302e6702b8..ee21d5c092 100644 --- a/storage/storage.cpp +++ b/storage/storage.cpp @@ -15,6 +15,7 @@ #include "coding/reader.hpp" #include "coding/url_encode.hpp" +#include "base/gmtime.hpp" #include "base/logging.hpp" #include "base/scope_guard.hpp" #include "base/stl_helpers.hpp" @@ -1559,6 +1560,18 @@ bool Storage::GetUpdateInfo(TCountryId const & countryId, UpdateInfo & updateInf void Storage::CorrectJustDownloadedAndQueue(TQueue::iterator justDownloadedItem) { + // Send stastics to Push Woosh. + { + GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kMapLastDownloaded, + justDownloadedItem->GetCountryId()); + char nowStr[18]{}; + auto const tp = std::chrono::system_clock::from_time_t(time(nullptr)); + tm now = my::GmTime(std::chrono::system_clock::to_time_t(tp)); + strftime(nowStr, sizeof(nowStr), "%Y-%m-%d %H:%M", &now); + GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kMapLastDownloadedTimestamp, + std::string(nowStr)); + } + m_justDownloaded.insert(justDownloadedItem->GetCountryId()); m_queue.erase(justDownloadedItem); if (m_queue.empty()) |