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

Unified Diff: google_apis/gcm/gcm_client_impl.h

Issue 207443002: [GCM] Move registration info persistence from extension state store to GCM store (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/gcm/gcm.gyp ('k') | google_apis/gcm/gcm_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/gcm_client_impl.h
diff --git a/google_apis/gcm/gcm_client_impl.h b/google_apis/gcm/gcm_client_impl.h
index f91a820f8703ce950aa2d64777ba76c5ce9de273..e969ec0180938dc74fd402b9c6996cf2015d4b3c 100644
--- a/google_apis/gcm/gcm_client_impl.h
+++ b/google_apis/gcm/gcm_client_impl.h
@@ -100,13 +100,13 @@ class GCM_EXPORT GCMClientImpl : public GCMClient {
// are pending registration requests to obtain a registration ID for
// requesting application.
typedef std::map<std::string, RegistrationRequest*>
- PendingRegistrations;
+ PendingRegistrationRequests;
// Collection of pending unregistration requests. Keys are app IDs, while
// values are pending unregistration requests to disable the registration ID
// currently assigned to the application.
typedef std::map<std::string, UnregistrationRequest*>
- PendingUnregistrations;
+ PendingUnregistrationRequests;
friend class GCMClientImplTest;
@@ -150,8 +150,12 @@ class GCM_EXPORT GCMClientImpl : public GCMClient {
// Callback for persisting device credentials in the |gcm_store_|.
void SetDeviceCredentialsCallback(bool success);
+ // Callback for persisting registration info in the |gcm_store_|.
+ void UpdateRegistrationCallback(bool success);
+
// Completes the registration request.
void OnRegisterCompleted(const std::string& app_id,
+ const std::vector<std::string>& sender_ids,
RegistrationRequest::Status status,
const std::string& registration_id);
@@ -214,15 +218,20 @@ class GCM_EXPORT GCMClientImpl : public GCMClient {
scoped_ptr<CheckinRequest> checkin_request_;
std::vector<std::string> account_ids_;
- // Currently pending registrations. GCMClientImpl owns the
+ // Cached registration info.
+ RegistrationInfoMap registrations_;
+
+ // Currently pending registration requests. GCMClientImpl owns the
// RegistrationRequests.
- PendingRegistrations pending_registrations_;
- STLValueDeleter<PendingRegistrations> pending_registrations_deleter_;
+ PendingRegistrationRequests pending_registration_requests_;
+ STLValueDeleter<PendingRegistrationRequests>
+ pending_registration_requests_deleter_;
- // Currently pending unregistrations. GCMClientImpl owns the
+ // Currently pending unregistration requests. GCMClientImpl owns the
// UnregistrationRequests.
- PendingUnregistrations pending_unregistrations_;
- STLValueDeleter<PendingUnregistrations> pending_unregistrations_deleter_;
+ PendingUnregistrationRequests pending_unregistration_requests_;
+ STLValueDeleter<PendingUnregistrationRequests>
+ pending_unregistration_requests_deleter_;
// Factory for creating references in callbacks.
base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_;
« no previous file with comments | « google_apis/gcm/gcm.gyp ('k') | google_apis/gcm/gcm_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698