Index: chrome/browser/extensions/api/gcm/gcm_api.cc |
diff --git a/chrome/browser/extensions/api/gcm/gcm_api.cc b/chrome/browser/extensions/api/gcm/gcm_api.cc |
index 65b1d49ec5b647fa87d069f6f85fd9cdff02b7f6..1da179921b7dfd202d9ddaad645c451c51516ca0 100644 |
--- a/chrome/browser/extensions/api/gcm/gcm_api.cc |
+++ b/chrome/browser/extensions/api/gcm/gcm_api.cc |
@@ -14,6 +14,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 "chrome/common/extensions/api/gcm.h" |
#include "extensions/browser/extension_system.h" |
#include "extensions/common/extension.h" |
@@ -97,7 +98,7 @@ bool GcmApiFunction::IsGcmApiEnabled() const { |
gcm::GCMProfileService::ALWAYS_DISABLED; |
} |
-gcm::GCMProfileService* GcmApiFunction::GCMProfileService() const { |
+gcm::GCMService* GcmApiFunction::GCMService() const { |
jianli
2014/04/17 00:33:19
GCMProfileServiceFactory::GetForProfile returns GC
bartfab (slow)
2014/04/17 14:20:01
Done.
|
return gcm::GCMProfileServiceFactory::GetForProfile( |
Profile::FromBrowserContext(browser_context())); |
} |
@@ -111,7 +112,7 @@ bool GcmRegisterFunction::DoWork() { |
api::gcm::Register::Params::Create(*args_)); |
EXTENSION_FUNCTION_VALIDATE(params.get()); |
- GCMProfileService()->Register( |
+ GCMService()->Register( |
GetExtension()->id(), |
params->sender_ids, |
base::Bind(&GcmRegisterFunction::CompleteFunctionWithResult, this)); |
@@ -132,7 +133,7 @@ GcmUnregisterFunction::GcmUnregisterFunction() {} |
GcmUnregisterFunction::~GcmUnregisterFunction() {} |
bool GcmUnregisterFunction::DoWork() { |
- GCMProfileService()->Unregister( |
+ GCMService()->Unregister( |
GetExtension()->id(), |
base::Bind(&GcmUnregisterFunction::CompleteFunctionWithResult, this)); |
@@ -162,7 +163,7 @@ bool GcmSendFunction::DoWork() { |
if (params->message.time_to_live.get()) |
outgoing_message.time_to_live = *params->message.time_to_live; |
- GCMProfileService()->Send( |
+ GCMService()->Send( |
GetExtension()->id(), |
params->message.destination_id, |
outgoing_message, |