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

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

Issue 14630003: signin: move SigninManagerBase::Signout to SigninManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apocalypse Created 7 years, 7 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.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(
« no previous file with comments | « chrome/browser/signin/signin_tracker_unittest.cc ('k') | chrome/browser/sync/profile_sync_service_startup_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698