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

Unified Diff: chrome/browser/sync/profile_sync_service_factory.cc

Issue 165993005: [GCM] Make sure GCM checkout logic is invoked when the profile is signed out (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test 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/sync/profile_sync_service_factory.cc
diff --git a/chrome/browser/sync/profile_sync_service_factory.cc b/chrome/browser/sync/profile_sync_service_factory.cc
index 6e2f86948b7240654a83e8b7d62e5d1cbf1e18a3..421fa01356472c241688e8c5953027c7a6ba0e39 100644
--- a/chrome/browser/sync/profile_sync_service_factory.cc
+++ b/chrome/browser/sync/profile_sync_service_factory.cc
@@ -95,16 +95,10 @@ BrowserContextKeyedService* ProfileSyncServiceFactory::BuildServiceInstanceFor(
SigninManagerBase* signin = SigninManagerFactory::GetForProfile(profile);
- // Automatically load the GCMProfileService if the enabled state has been
- // explicitly set.
- const base::Value* gcm_enabled_value =
- profile->GetPrefs()->GetUserPrefValue(prefs::kGCMChannelEnabled);
- bool gcm_enabled = false;
- if (gcm_enabled_value &&
- gcm_enabled_value->GetAsBoolean(&gcm_enabled) &&
- gcm_enabled) {
- gcm::GCMProfileServiceFactory::GetForProfile(profile);
- }
+ // Always create the GCMProfileService instance such that we can listen to
+ // the profile notifications and purge the GCM store when the profile is
+ // being signed out.
+ gcm::GCMProfileServiceFactory::GetForProfile(profile);
SeRya 2014/03/04 08:35:26 Shouldn't it be paired with DependsOn(gcm::GCMProf
// TODO(atwilson): Change AboutSigninInternalsFactory to load on startup
// once http://crbug.com/171406 has been fixed.

Powered by Google App Engine
This is Rietveld 408576698