Index: components/gcm_driver/gcm_driver.h |
diff --git a/components/gcm_driver/gcm_driver.h b/components/gcm_driver/gcm_driver.h |
index fb20f3ac3af6435e31771301fcb296c98f15d9ce..a0ed95754049df3bd8740db78eff698238766132 100644 |
--- a/components/gcm_driver/gcm_driver.h |
+++ b/components/gcm_driver/gcm_driver.h |
@@ -146,6 +146,18 @@ class GCMDriver { |
// to send a heartbeat message. |
virtual void WakeFromSuspendForHeartbeat(bool wake) = 0; |
+ // Adds or removes a custom client requested heartbeat interval. If multiple |
+ // components set that setting, the lowest setting will be used. If the |
+ // setting is outside of GetMax/MinClientHeartbeatIntervalMs() it will be |
+ // ignored. If a new setting is less than the currently used, the connection |
+ // will be reset with the new heartbeat. Client that no longer require |
+ // aggressive heartbeats, should remove their requested interval. Heartbeats |
+ // set this way survive connection/Chrome restart. |
+ // Server can overwrite the setting to a different value. |
+ virtual void AddHeartbeatInterval(const std::string& scope, |
Nicolas Zea
2015/05/07 18:13:52
nit: describe what scope is and how it should be s
fgorski
2015/05/10 06:44:34
Done.
|
+ int interval_ms) = 0; |
+ virtual void RemoveHeartbeatInterval(const std::string& scope) = 0; |
+ |
protected: |
// Ensures that the GCM service starts (if necessary conditions are met). |
virtual GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) = 0; |