[GCM] Wiring heartbeat interval calls to GCMDriver
Wires the call to Add/RemoveHeartbeatInterval through:
* GCMDriver/Desktop/Android/Fake
* GCMDriverDesktop::IOWorker
* GCMClient/Impl to MCSClient
* Adding loading of persisted interval in MCSClient
BUG=481174
Review URL: https://codereview.chromium.org/1124783002
Cr-Commit-Position: refs/heads/master@{#329750}
diff --git a/components/gcm_driver/gcm_client.h b/components/gcm_driver/gcm_client.h
index cd804b2..86722339 100644
--- a/components/gcm_driver/gcm_client.h
+++ b/components/gcm_driver/gcm_client.h
@@ -320,6 +320,14 @@
// Retrieves the Instance ID data for a specific app from the persistent
// store.
virtual std::string GetInstanceIDData(const std::string& app_id) = 0;
+
+ // Gets and sets custom heartbeat interval for the MCS connection.
+ // |scope| is used to identify the component that requests a custom interval
+ // to be set, and allows that component to later revoke the setting. It should
+ // be unique.
+ virtual void AddHeartbeatInterval(const std::string& scope,
+ int interval_ms) = 0;
+ virtual void RemoveHeartbeatInterval(const std::string& scope) = 0;
};
} // namespace gcm