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

Unified Diff: chrome/browser/extensions/api/gcm/gcm_api.cc

Issue 130473002: [GCM] Make GCM API not work in incognito mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
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 {
« no previous file with comments | « no previous file | chrome/browser/extensions/api/gcm/gcm_apitest.cc » ('j') | chrome/browser/services/gcm/gcm_profile_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698