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

Side by Side Diff: components/gcm_driver/gcm_client.h

Issue 600053002: [GCM] Loading the account mappings from store to the driver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_
6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 // Called when a message was acknowledged by the GCM server. 195 // Called when a message was acknowledged by the GCM server.
196 // |app_id|: application ID. 196 // |app_id|: application ID.
197 // |message_id|: ID of the acknowledged message. 197 // |message_id|: ID of the acknowledged message.
198 virtual void OnSendAcknowledged(const std::string& app_id, 198 virtual void OnSendAcknowledged(const std::string& app_id,
199 const std::string& message_id) = 0; 199 const std::string& message_id) = 0;
200 200
201 // Called when the GCM becomes ready. To get to this state, GCMClient 201 // Called when the GCM becomes ready. To get to this state, GCMClient
202 // finished loading from the GCM store and retrieved the device check-in 202 // finished loading from the GCM store and retrieved the device check-in
203 // from the server if it hadn't yet. 203 // from the server if it hadn't yet.
204 virtual void OnGCMReady() = 0; 204 // |account_mappings|: a list of accounts mapped to this GCM client.
jianli 2014/09/24 21:21:31 nit: a list of persisted accounts ...
fgorski 2014/09/24 22:25:40 Done.
205 virtual void OnGCMReady(
206 const std::vector<AccountMapping>& account_mappings) = 0;
205 207
206 // Called when activities are being recorded and a new activity has just 208 // Called when activities are being recorded and a new activity has just
207 // been recorded. 209 // been recorded.
208 virtual void OnActivityRecorded() = 0; 210 virtual void OnActivityRecorded() = 0;
209 211
210 // Called when a new connection is established and a successful handshake 212 // Called when a new connection is established and a successful handshake
211 // has been performed. 213 // has been performed.
212 virtual void OnConnected(const net::IPEndPoint& ip_endpoint) = 0; 214 virtual void OnConnected(const net::IPEndPoint& ip_endpoint) = 0;
213 215
214 // Called when the connection is interrupted. 216 // Called when the connection is interrupted.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 virtual void UpdateAccountMapping(const AccountMapping& account_mapping) = 0; 291 virtual void UpdateAccountMapping(const AccountMapping& account_mapping) = 0;
290 292
291 // Removes the account mapping related to |account_id| from the persistent 293 // Removes the account mapping related to |account_id| from the persistent
292 // store. 294 // store.
293 virtual void RemoveAccountMapping(const std::string& account_id) = 0; 295 virtual void RemoveAccountMapping(const std::string& account_id) = 0;
294 }; 296 };
295 297
296 } // namespace gcm 298 } // namespace gcm
297 299
298 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ 300 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698