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

Unified Diff: chrome/browser/services/gcm/gcm_profile_service_factory.cc

Issue 130473002: [GCM] Make GCM API not work in incognito mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land 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/services/gcm/gcm_profile_service_factory.cc
diff --git a/chrome/browser/services/gcm/gcm_profile_service_factory.cc b/chrome/browser/services/gcm/gcm_profile_service_factory.cc
index 489feea77f89822858b5d5a86d6598928f37c559..2724911ffdf7cf00e0b03d6ce3fcc54bde1b1a41 100644
--- a/chrome/browser/services/gcm/gcm_profile_service_factory.cc
+++ b/chrome/browser/services/gcm/gcm_profile_service_factory.cc
@@ -13,7 +13,7 @@ namespace gcm {
// static
GCMProfileService* GCMProfileServiceFactory::GetForProfile(Profile* profile) {
- if (!gcm::GCMProfileService::IsGCMEnabled())
+ if (!gcm::GCMProfileService::IsGCMEnabled(profile))
return NULL;
return static_cast<GCMProfileService*>(
@@ -35,9 +35,10 @@ GCMProfileServiceFactory::~GCMProfileServiceFactory() {
}
BrowserContextKeyedService* GCMProfileServiceFactory::BuildServiceInstanceFor(
- content::BrowserContext* profile) const {
- return gcm::GCMProfileService::IsGCMEnabled() ?
- new GCMProfileService(static_cast<Profile*>(profile)) : NULL;
+ content::BrowserContext* context) const {
+ Profile* profile = static_cast<Profile*>(context);
+ return gcm::GCMProfileService::IsGCMEnabled(profile) ?
+ new GCMProfileService(profile) : NULL;
}
content::BrowserContext* GCMProfileServiceFactory::GetBrowserContextToUse(
« no previous file with comments | « chrome/browser/services/gcm/gcm_profile_service.cc ('k') | chrome/browser/services/gcm/gcm_profile_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698