Index: chrome/browser/services/gcm/push_messaging_service_impl.h |
diff --git a/chrome/browser/services/gcm/push_messaging_service_impl.h b/chrome/browser/services/gcm/push_messaging_service_impl.h |
index 9cc53c08b73d2b11ba3168ee531d8b7b0c2f0397..a8db9a14ffcab514703214bf8976c5c71c1e3385 100644 |
--- a/chrome/browser/services/gcm/push_messaging_service_impl.h |
+++ b/chrome/browser/services/gcm/push_messaging_service_impl.h |
@@ -75,8 +75,9 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
void SetProfileForTesting(Profile* profile); |
private: |
- void IncreasePushRegistrationCount(int add); |
- void DecreasePushRegistrationCount(int subtract); |
+ // A registration is pending until it has succeeded or failed. |
+ void IncreasePushRegistrationCount(int add, bool is_pending); |
+ void DecreasePushRegistrationCount(int subtract, bool was_pending); |
void DeliverMessageCallback(const PushMessagingApplicationId& application_id, |
const GCMClient::IncomingMessage& message, |
@@ -120,15 +121,12 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
// Helper method that checks if a given origin is allowed to use Push. |
bool HasPermission(const GURL& origin); |
- // Adds this service as an app handler to the GCMDriver if it has not been |
- // added yet. |
- void AddAppHandlerIfNecessary(); |
- |
GCMProfileService* gcm_profile_service_; // It owns us. |
Profile* profile_; // It owns our owner. |
int push_registration_count_; |
+ int pending_push_registration_count_; |
base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; |