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

Unified Diff: chrome/browser/signin/signin_tracker.cc

Issue 14655009: Client changes for disabled dasher account (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup 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/signin/signin_tracker.cc
diff --git a/chrome/browser/signin/signin_tracker.cc b/chrome/browser/signin/signin_tracker.cc
index cdddc4966590e381a1aeffda7c2072334b4b6b94..42cc54f0e5936712bcf2bcb983b1ca3244b9d4f0 100644
--- a/chrome/browser/signin/signin_tracker.cc
+++ b/chrome/browser/signin/signin_tracker.cc
@@ -171,6 +171,10 @@ bool SigninTracker::AreServicesSignedIn(Profile* profile) {
return true;
ProfileSyncService* service =
ProfileSyncServiceFactory::GetForProfile(profile);
+ // Check if sync disabled for domain flag was received from server. Don't care
+ // about the sync state in this case.
+ if (service->IsManaged())
Andrew T Wilson (Slow) 2013/05/24 15:13:10 Rather than making every caller of Profile::IsSync
pavely 2013/05/24 22:17:11 I tried this in my experiments. The issue is that
Andrew T Wilson (Slow) 2013/05/27 15:03:34 Yeah, that's a funky edge case. You could deal wit
+ return true;
return (service->IsSyncEnabledAndLoggedIn() &&
service->IsSyncTokenAvailable() &&
service->GetAuthError().state() == GoogleServiceAuthError::NONE &&
@@ -195,6 +199,8 @@ SigninTracker::LoginState SigninTracker::GetSigninState(
// also.
ProfileSyncService* service = profile->IsSyncAccessible() ?
ProfileSyncServiceFactory::GetForProfile(profile) : NULL;
+ if (service->IsManaged())
Andrew T Wilson (Slow) 2013/05/24 15:13:10 See my previous comment - if IsSyncAccessible() ca
+ service = NULL;
if (service && service->waiting_for_auth()) {
// Still waiting for an auth token to come in so stay in the INITIALIZING
// state (we do this to avoid triggering an early signin error in the case
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.h » ('j') | chrome/browser/sync/profile_sync_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698