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

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

Issue 8783001: Fix the sync sign in dialog issues for app notifications: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_ui.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698