Chromium Code Reviews| Index: chrome/browser/signin/signin_tracker.cc |
| diff --git a/chrome/browser/signin/signin_tracker.cc b/chrome/browser/signin/signin_tracker.cc |
| index 689717b8a6222eb7a8c0b47d6858fc1be4681ba6..deeb222101485443979c4b409fcdca8e7b7dd76e 100644 |
| --- a/chrome/browser/signin/signin_tracker.cc |
| +++ b/chrome/browser/signin/signin_tracker.cc |
| @@ -134,7 +134,8 @@ void SigninTracker::HandleServiceStateChange() { |
| } |
| SigninManager* signin = SigninManagerFactory::GetForProfile(profile_); |
| - if (signin->GetAuthenticatedUsername().empty()) { |
| + if (signin->GetAuthenticatedUsername().empty() || |
| + !signin->IsSigninAllowed()) { |
|
sail
2013/02/08 20:18:57
This code doesn't make any sense. If sign in is no
Andrew T Wilson (Slow)
2013/02/08 20:33:11
Because signin isn't allowed, so signin should fai
Adrian Kuegel
2013/02/11 16:47:30
IsSigninAllowed returns true if signin is allowed.
|
| // User is signed out, trigger a signin failure. |
| state_ = WAITING_FOR_GAIA_VALIDATION; |
| observer_->SigninFailed( |
| @@ -146,8 +147,9 @@ void SigninTracker::HandleServiceStateChange() { |
| // Long term, we should separate out service auth failures from the signin |
| // process, but for the current UI flow we'll validate service signin status |
| // also. |
| - ProfileSyncService* service = profile_->IsSyncAccessible() ? |
| - ProfileSyncServiceFactory::GetForProfile(profile_) : NULL; |
| + ProfileSyncService* service = |
|
sail
2013/02/08 20:18:57
Why this change?
Adrian Kuegel
2013/02/11 16:47:30
Sorry, that was a relict from an earlier version o
|
| + profile_->IsSyncAccessible() ? |
| + ProfileSyncServiceFactory::GetForProfile(profile_) : 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 |