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 9aa68896af609944e9836da06a1d9a83b4b2c07b..1b45413003bcea065a5eccb75908758a081057ab 100644 |
--- a/chrome/browser/extensions/api/gcm/gcm_api.cc |
+++ b/chrome/browser/extensions/api/gcm/gcm_api.cc |
@@ -85,8 +85,9 @@ bool GcmApiFunction::RunImpl() { |
} |
bool GcmApiFunction::IsGcmApiEnabled() const { |
- return gcm::GCMProfileService::IsGCMEnabled() && |
- !GetExtension()->public_key().empty(); |
+ return gcm::GCMProfileService::IsGCMEnabled( |
+ Profile::FromBrowserContext(context())) && |
+ !GetExtension()->public_key().empty(); |
} |
gcm::GCMProfileService* GcmApiFunction::GCMProfileService() const { |