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

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

Issue 184273011: Merge 253787 "[GCM] Make sure GCM checkout logic is invoked when..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1847/src/
Patch Set: Created 6 years, 10 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
===================================================================
--- chrome/browser/services/gcm/gcm_profile_service_factory.cc (revision 255183)
+++ chrome/browser/services/gcm/gcm_profile_service_factory.cc (working copy)
@@ -14,7 +14,8 @@
// static
GCMProfileService* GCMProfileServiceFactory::GetForProfile(Profile* profile) {
- if (!gcm::GCMProfileService::IsGCMEnabled(profile))
+ // GCM is not supported in incognito mode.
+ if (profile->IsOffTheRecord())
return NULL;
return static_cast<GCMProfileService*>(
@@ -38,8 +39,6 @@
BrowserContextKeyedService* GCMProfileServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Profile* profile = static_cast<Profile*>(context);
- if (!gcm::GCMProfileService::IsGCMEnabled(profile))
- return NULL;
GCMProfileService* service = new GCMProfileService(profile);
scoped_ptr<GCMClientFactory> gcm_client_factory(new GCMClientFactory);
service->Initialize(gcm_client_factory.Pass());
« 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