Index: chrome/browser/extensions/extension_gcm_app_handler.cc |
diff --git a/chrome/browser/extensions/extension_gcm_app_handler.cc b/chrome/browser/extensions/extension_gcm_app_handler.cc |
index e0b254546122b3547dea63a0e4eb1acc54e15f69..4676fadf55a111817a23f53127a8b4c157000f2f 100644 |
--- a/chrome/browser/extensions/extension_gcm_app_handler.cc |
+++ b/chrome/browser/extensions/extension_gcm_app_handler.cc |
@@ -11,6 +11,7 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/services/gcm/gcm_profile_service.h" |
#include "chrome/browser/services/gcm/gcm_profile_service_factory.h" |
+#include "chrome/browser/services/gcm/gcm_service.h" |
#include "content/public/browser/notification_details.h" |
#include "content/public/browser/notification_source.h" |
#include "extensions/browser/extension_registry.h" |
@@ -68,7 +69,7 @@ ExtensionGCMAppHandler::~ExtensionGCMAppHandler() { |
extension != enabled_extensions.end(); |
++extension) { |
if (IsGCMPermissionEnabled(extension->get())) |
- GetGCMProfileService()->RemoveAppHandler((*extension)->id()); |
+ GetGCMService()->RemoveAppHandler((*extension)->id()); |
jianli
2014/04/10 20:39:56
Why? Extension is tied with profile.
bartfab (slow)
2014/04/11 16:58:52
I had made the change here to make it explicit tha
|
} |
} |
@@ -108,25 +109,25 @@ void ExtensionGCMAppHandler::Observe( |
case chrome:: NOTIFICATION_EXTENSION_LOADED: { |
const Extension* extension = content::Details<Extension>(details).ptr(); |
if (IsGCMPermissionEnabled(extension)) |
- GetGCMProfileService()->AddAppHandler(extension->id(), this); |
+ GetGCMService()->AddAppHandler(extension->id(), this); |
break; |
} |
case chrome:: NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: { |
const Extension* extension = |
content::Details<UnloadedExtensionInfo>(details)->extension; |
if (IsGCMPermissionEnabled(extension)) |
- GetGCMProfileService()->RemoveAppHandler(extension->id()); |
+ GetGCMService()->RemoveAppHandler(extension->id()); |
break; |
} |
case chrome:: NOTIFICATION_EXTENSION_UNINSTALLED: { |
const Extension* extension = content::Details<Extension>(details).ptr(); |
if (IsGCMPermissionEnabled(extension)) { |
- GetGCMProfileService()->Unregister( |
+ GetGCMService()->Unregister( |
extension->id(), |
base::Bind(&ExtensionGCMAppHandler::OnUnregisterCompleted, |
weak_factory_.GetWeakPtr(), |
extension->id())); |
- GetGCMProfileService()->RemoveAppHandler(extension->id()); |
+ GetGCMService()->RemoveAppHandler(extension->id()); |
} |
break; |
} |
@@ -135,7 +136,7 @@ void ExtensionGCMAppHandler::Observe( |
} |
} |
-gcm::GCMProfileService* ExtensionGCMAppHandler::GetGCMProfileService() const { |
+gcm::GCMService* ExtensionGCMAppHandler::GetGCMService() const { |
return gcm::GCMProfileServiceFactory::GetForProfile(profile_); |
} |