Index: chrome/browser/sync/profile_sync_service_factory.cc |
=================================================================== |
--- chrome/browser/sync/profile_sync_service_factory.cc (revision 255183) |
+++ chrome/browser/sync/profile_sync_service_factory.cc (working copy) |
@@ -95,16 +95,10 @@ |
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); |
// TODO(atwilson): Change AboutSigninInternalsFactory to load on startup |
// once http://crbug.com/171406 has been fixed. |