| Index: components/gcm_driver/gcm_driver.h
|
| diff --git a/components/gcm_driver/gcm_driver.h b/components/gcm_driver/gcm_driver.h
|
| index aac0975fbd351c0eb605c354ec73b702e59726ec..caae284fe837ce640da82d07d0f0338734c00813 100644
|
| --- a/components/gcm_driver/gcm_driver.h
|
| +++ b/components/gcm_driver/gcm_driver.h
|
| @@ -169,6 +169,28 @@ class GCMDriver {
|
| // Supports saving the Instance ID data in the GCM store.
|
| virtual InstanceIDStore* GetInstanceIDStore() = 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.
|
| + //
|
| + // GCM Driver can decide to postpone the action until Client is properly
|
| + // initialized, hence this setting can be called at any time.
|
| + //
|
| + // Server can overwrite the setting to a different value.
|
| + //
|
| + // |scope| is used to identify the component that requests a custom interval
|
| + // to be set, and allows that component to later revoke the setting.
|
| + // |interval_ms| should be between 2 minues and 15 minues (28 minues on
|
| + // cellular networks). For details check
|
| + // GetMin/MaxClientHeartbeatItnervalMs() in HeartbeatManager.
|
| + virtual void AddHeartbeatInterval(const std::string& scope,
|
| + 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;
|
|
|