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

Unified Diff: google_apis/gcm/engine/gcm_store.h

Issue 1121003003: [GCM] Adding handling of heartbeat intervals to the GCM store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@heartbeat-gcm
Patch Set: Adding histrograms Created 5 years, 8 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 | « no previous file | google_apis/gcm/engine/gcm_store_impl.h » ('j') | google_apis/gcm/engine/gcm_store_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/gcm_store.h
diff --git a/google_apis/gcm/engine/gcm_store.h b/google_apis/gcm/engine/gcm_store.h
index 9bad954b669aaf40ba1639100055887149c2fc3f..0cbb0857243840637279f8104781527316953221 100644
--- a/google_apis/gcm/engine/gcm_store.h
+++ b/google_apis/gcm/engine/gcm_store.h
@@ -56,6 +56,7 @@ class GCM_EXPORT GCMStore {
std::set<std::string> last_checkin_accounts;
AccountMappings account_mappings;
base::Time last_token_fetch_time;
+ std::map<std::string, int> heartbeat_intervals;
};
typedef std::vector<std::string> PersistentIdList;
@@ -133,6 +134,13 @@ class GCM_EXPORT GCMStore {
virtual void SetLastTokenFetchTime(const base::Time& time,
const UpdateCallback& callback) = 0;
+ // Sets the custom client heartbeat interval for a specified scope.
+ virtual void AddHeartbeatInterval(const std::string& scope,
+ int interval_ms,
+ const UpdateCallback& callback) = 0;
+ virtual void RemoveHeartbeatInterval(const std::string& scope,
+ const UpdateCallback& callback) = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(GCMStore);
};
« no previous file with comments | « no previous file | google_apis/gcm/engine/gcm_store_impl.h » ('j') | google_apis/gcm/engine/gcm_store_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698