Index: chrome/browser/sync/profile_sync_service.cc |
=================================================================== |
--- chrome/browser/sync/profile_sync_service.cc (revision 112743) |
+++ chrome/browser/sync/profile_sync_service.cc (working copy) |
@@ -1476,6 +1476,20 @@ |
AreCredentialsAvailable(true)) { |
if (backend_initialized_) { |
backend_->UpdateCredentials(GetCredentials()); |
+ const GoogleServiceAuthError& last_error = GetAuthError(); |
+ if (GoogleServiceAuthError::NONE == last_error.state()) { |
+ // SyncBackendHost::UpdateCredentials call does not call back |
+ // OnAuthError in cases when the underlying syncer state does not |
+ // change. Due to that if the login dialog is showing up when the |
+ // credentials have not expired as such (this happens when login |
+ // dialog is shown by app notifications setup code) the login dialog |
+ // will show the spinner forever. Hence, we call OnAuthError |
+ // explicitly here to avoid the infinite spinner in that case. |
+ // Note that SyncBackendHost::UpdateCredentials may actually end up |
+ // failing, but in that case an error will be shown to the user in |
+ // bookmarks bar and preferences. |
+ OnAuthError(); |
tim (not reviewing)
2011/12/06 23:39:31
Why did we do this this way? From my email, I sug
Munjal (Google)
2011/12/07 00:05:14
The main reason is that this seemed the safest (lo
|
+ } |
} |
if (!sync_prefs_.IsStartSuppressed()) |
StartUp(); |