Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: components/gcm_driver/gcm_driver_desktop.h

Issue 681453004: [GCM] Adding last token fetching time handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing Android build Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/gcm_driver/gcm_driver_android.cc ('k') | components/gcm_driver/gcm_driver_desktop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_driver_desktop.h
diff --git a/components/gcm_driver/gcm_driver_desktop.h b/components/gcm_driver/gcm_driver_desktop.h
index 7267de0e478290a6237496bfd8d1146d1d9ee292..3f72c26a1cdf8000e46e76f33202cca794a8f938 100644
--- a/components/gcm_driver/gcm_driver_desktop.h
+++ b/components/gcm_driver/gcm_driver_desktop.h
@@ -81,6 +81,8 @@ class GCMDriverDesktop : public GCMDriver {
const std::vector<GCMClient::AccountTokenInfo>& account_tokens) override;
void UpdateAccountMapping(const AccountMapping& account_mapping) override;
void RemoveAccountMapping(const std::string& account_id) override;
+ base::Time GetLastTokenFetchTime() override;
+ void SetLastTokenFetchTime(const base::Time& time) override;
// Exposed for testing purpose.
bool gcm_enabled() const { return gcm_enabled_; }
@@ -122,8 +124,8 @@ class GCMDriverDesktop : public GCMDriver {
const GCMClient::SendErrorDetails& send_error_details);
void SendAcknowledged(const std::string& app_id,
const std::string& message_id);
- void GCMClientReady(
- const std::vector<AccountMapping>& account_mappings);
+ void GCMClientReady(const std::vector<AccountMapping>& account_mappings,
+ const base::Time& last_token_fetch_time);
void OnConnected(const net::IPEndPoint& ip_endpoint);
void OnDisconnected();
@@ -154,6 +156,9 @@ class GCMDriverDesktop : public GCMDriver {
// Account mapper. Only works when user is signed in.
scoped_ptr<GCMAccountMapper> account_mapper_;
+ // Time of last token fetching.
+ base::Time last_token_fetch_time_;
+
scoped_refptr<base::SequencedTaskRunner> ui_thread_;
scoped_refptr<base::SequencedTaskRunner> io_thread_;
« no previous file with comments | « components/gcm_driver/gcm_driver_android.cc ('k') | components/gcm_driver/gcm_driver_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698