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

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: 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..f01239192bee0878418ba0cdad36359c3f83817b 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(static_cast<Profile*>(profile)))
fgorski 2014/01/09 22:06:55 I don't think you need a cast here. profile is alr
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(

Powered by Google App Engine
This is Rietveld 408576698