summaryrefslogtreecommitdiffstats
path: root/components/gcm_driver/gcm_client_impl.h
diff options
context:
space:
mode:
authorjianli <jianli@chromium.org>2015-05-11 14:14:13 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-11 21:14:58 +0000
commit10018b2d2d5954cb697ccad19eef63919aef0786 (patch)
tree7f5f4fa86eacf75884463c87438ddfe84b1fd4f1 /components/gcm_driver/gcm_client_impl.h
parente8624082aaf1743e46f2868f807ac164c587d77b (diff)
downloadchromium_src-10018b2d2d5954cb697ccad19eef63919aef0786.zip
chromium_src-10018b2d2d5954cb697ccad19eef63919aef0786.tar.gz
chromium_src-10018b2d2d5954cb697ccad19eef63919aef0786.tar.bz2
Persist Instance ID data to GCM store.
BUG=477084 TEST=new tests TBR=asvitkine@chromium.org Review URL: https://codereview.chromium.org/1126233004 Cr-Commit-Position: refs/heads/master@{#329233}
Diffstat (limited to 'components/gcm_driver/gcm_client_impl.h')
-rw-r--r--components/gcm_driver/gcm_client_impl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/gcm_driver/gcm_client_impl.h b/components/gcm_driver/gcm_client_impl.h
index 65b04a6..2db1805 100644
--- a/components/gcm_driver/gcm_client_impl.h
+++ b/components/gcm_driver/gcm_client_impl.h
@@ -126,6 +126,10 @@ class GCMClientImpl
void RemoveAccountMapping(const std::string& account_id) override;
void SetLastTokenFetchTime(const base::Time& time) override;
void UpdateHeartbeatTimer(scoped_ptr<base::Timer> timer) override;
+ void AddInstanceIDData(const std::string& app_id,
+ const std::string& instance_id_data) override;
+ void RemoveInstanceIDData(const std::string& app_id) override;
+ std::string GetInstanceIDData(const std::string& app_id) override;
// GCMStatsRecorder::Delegate implemenation.
void OnActivityRecorded() override;
@@ -341,6 +345,9 @@ class GCMClientImpl
// Time of the last successful checkin.
base::Time last_checkin_time_;
+ // Cached instance ID data, key is app id.
+ std::map<std::string, std::string> instance_id_data_;
+
// Factory for creating references when scheduling periodic checkin.
base::WeakPtrFactory<GCMClientImpl> periodic_checkin_ptr_factory_;