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

Side by Side Diff: google_apis/gcm/engine/gcm_store.h

Issue 1126233004: Persist Instance ID data to GCM store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_ 5 #ifndef GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_
6 #define GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_ 6 #define GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 RegistrationInfoMap registrations; 50 RegistrationInfoMap registrations;
51 std::vector<std::string> incoming_messages; 51 std::vector<std::string> incoming_messages;
52 OutgoingMessageMap outgoing_messages; 52 OutgoingMessageMap outgoing_messages;
53 std::map<std::string, std::string> gservices_settings; 53 std::map<std::string, std::string> gservices_settings;
54 std::string gservices_digest; 54 std::string gservices_digest;
55 base::Time last_checkin_time; 55 base::Time last_checkin_time;
56 std::set<std::string> last_checkin_accounts; 56 std::set<std::string> last_checkin_accounts;
57 AccountMappings account_mappings; 57 AccountMappings account_mappings;
58 base::Time last_token_fetch_time; 58 base::Time last_token_fetch_time;
59 std::map<std::string, int> heartbeat_intervals; 59 std::map<std::string, int> heartbeat_intervals;
60 std::map<std::string, std::string> instance_id_data;
60 }; 61 };
61 62
62 typedef std::vector<std::string> PersistentIdList; 63 typedef std::vector<std::string> PersistentIdList;
63 typedef base::Callback<void(scoped_ptr<LoadResult> result)> LoadCallback; 64 typedef base::Callback<void(scoped_ptr<LoadResult> result)> LoadCallback;
64 typedef base::Callback<void(bool success)> UpdateCallback; 65 typedef base::Callback<void(bool success)> UpdateCallback;
65 66
66 GCMStore(); 67 GCMStore();
67 virtual ~GCMStore(); 68 virtual ~GCMStore();
68 69
69 // Load the data from persistent store and pass the initial state back to 70 // Load the data from persistent store and pass the initial state back to
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 virtual void SetLastTokenFetchTime(const base::Time& time, 135 virtual void SetLastTokenFetchTime(const base::Time& time,
135 const UpdateCallback& callback) = 0; 136 const UpdateCallback& callback) = 0;
136 137
137 // Sets the custom client heartbeat interval for a specified scope. 138 // Sets the custom client heartbeat interval for a specified scope.
138 virtual void AddHeartbeatInterval(const std::string& scope, 139 virtual void AddHeartbeatInterval(const std::string& scope,
139 int interval_ms, 140 int interval_ms,
140 const UpdateCallback& callback) = 0; 141 const UpdateCallback& callback) = 0;
141 virtual void RemoveHeartbeatInterval(const std::string& scope, 142 virtual void RemoveHeartbeatInterval(const std::string& scope,
142 const UpdateCallback& callback) = 0; 143 const UpdateCallback& callback) = 0;
143 144
145 // Instance ID data.
146 virtual void AddInstanceIDData(const std::string& app_id,
147 const std::string& instance_id_data,
148 const UpdateCallback& callback) = 0;
149 virtual void RemoveInstanceIDData(const std::string& app_id,
150 const UpdateCallback& callback) = 0;
151
144 private: 152 private:
145 DISALLOW_COPY_AND_ASSIGN(GCMStore); 153 DISALLOW_COPY_AND_ASSIGN(GCMStore);
146 }; 154 };
147 155
148 } // namespace gcm 156 } // namespace gcm
149 157
150 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_ 158 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_
OLDNEW
« no previous file with comments | « components/gcm_driver/instance_id/instance_id_impl.cc ('k') | google_apis/gcm/engine/gcm_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698