Index: chrome/browser/sync/profile_sync_service.cc |
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc |
index 6bde4cca7f81b212fd414293d8584760798ffb47..51ed6bf818f3adb3d7e72e3cef33b7363cac76b0 100644 |
--- a/chrome/browser/sync/profile_sync_service.cc |
+++ b/chrome/browser/sync/profile_sync_service.cc |
@@ -1080,9 +1080,18 @@ void ProfileSyncService::OnStopSyncingPermanently() { |
UpdateAuthErrorState(AuthError(AuthError::SERVICE_UNAVAILABLE)); |
sync_prefs_.SetStartSuppressed(true); |
DisableForUser(); |
- // If signout is allowed, signout the user on a dashboard clear. |
+ |
+ // Signout doesn't exist as a concept on Chrome OS. It currently does |
+ // on other auto-start platforms (like Android, though we should probably |
+ // use SigninManagerBase there as well), but we don't want to sign the |
+ // user out on auto-start platforms if sync was disabled. |
+ // TODO(tim): Platform specific refactoring here is bug 237866. |
+#if !defined(OS_CHROMEOS) |
+ SigninManager* signin = SigninManagerFactory::GetForProfile(profile_); |
+ |
if (!auto_start_enabled_) // Skip signout on ChromeOS/Android. |
- signin_->SignOut(); |
+ signin->SignOut(); |
+#endif |
} |
void ProfileSyncService::OnPassphraseRequired( |