diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 01:31:05 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 01:31:05 +0000 |
commit | c41a4531e68a6acf979458001ae5adc76aadf39d (patch) | |
tree | 80f3c8e7528e44ba45eec33a810fecb3761c1722 /chrome | |
parent | d91e347bc7c5cdc075884ae16a968fbf1b6c8708 (diff) | |
download | chromium_src-c41a4531e68a6acf979458001ae5adc76aadf39d.zip chromium_src-c41a4531e68a6acf979458001ae5adc76aadf39d.tar.gz chromium_src-c41a4531e68a6acf979458001ae5adc76aadf39d.tar.bz2 |
Always pass along the GAIA failure event, regardless of the local authentication condition. This is necessary since the UI is waiting for the event, and has no effect on the other listeners.
BUG=19720
TEST=let server creds expire, then login with bad password; should get an error message not a hung UI
Review URL: http://codereview.chromium.org/2988002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/sync/engine/auth_watcher.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/chrome/browser/sync/engine/auth_watcher.cc b/chrome/browser/sync/engine/auth_watcher.cc index 569dbe9..46b3852 100644 --- a/chrome/browser/sync/engine/auth_watcher.cc +++ b/chrome/browser/sync/engine/auth_watcher.cc @@ -215,20 +215,13 @@ bool AuthWatcher::AuthenticateLocally(string email, const string& password) { void AuthWatcher::ProcessGaiaAuthFailure() { DCHECK_EQ(MessageLoop::current(), message_loop()); gaia::GaiaAuthenticator::AuthResults results = gaia_->results(); - if (LOCALLY_AUTHENTICATED == status_) { - return; // nothing todo - } else if (AuthenticateLocally(results.email, results.password)) { + if (LOCALLY_AUTHENTICATED != status_ && + AuthenticateLocally(results.email, results.password)) { // TODO(chron): Do we really want a bogus token? const string auth_token("bogus"); user_settings_->SetAuthTokenForService(results.email, SYNC_SERVICE_NAME, auth_token); - const bool unavailable = - gaia::ConnectionUnavailable == results.auth_error || - gaia::Unknown == results.auth_error || - gaia::ServiceUnavailable == results.auth_error; - if (unavailable) - return; } AuthWatcherEvent myevent = { AuthWatcherEvent::GAIA_AUTH_FAILED, &results }; NotifyListeners(&myevent); |