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

Unified Diff: chrome/common/net/gaia/gaia_auth_fetcher.cc

Issue 5309007: [ChromeOS] Make GaiaAutheFetcher parsing logic default to service_unavailable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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/common/net/gaia/gaia_auth_fetcher.h ('k') | chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/gaia/gaia_auth_fetcher.cc
diff --git a/chrome/common/net/gaia/gaia_auth_fetcher.cc b/chrome/common/net/gaia/gaia_auth_fetcher.cc
index ec6e808cab7ca62d8520b11caa091767e35ed5d7..0499168bf8043d05525d2efc159d3405bdf32921 100644
--- a/chrome/common/net/gaia/gaia_auth_fetcher.cc
+++ b/chrome/common/net/gaia/gaia_auth_fetcher.cc
@@ -53,6 +53,8 @@ const char GaiaAuthFetcher::kAccountDeletedError[] = "AccountDeleted";
// static
const char GaiaAuthFetcher::kAccountDisabledError[] = "AccountDisabled";
// static
+const char GaiaAuthFetcher::kBadAuthenticationError[] = "BadAuthentication";
+// static
const char GaiaAuthFetcher::kCaptchaError[] = "CaptchaRequired";
// static
const char GaiaAuthFetcher::kServiceUnavailableError[] =
@@ -344,13 +346,18 @@ GoogleServiceAuthError GaiaAuthFetcher::GenerateAuthError(
return GoogleServiceAuthError(GoogleServiceAuthError::ACCOUNT_DELETED);
if (error == kAccountDisabledError)
return GoogleServiceAuthError(GoogleServiceAuthError::ACCOUNT_DISABLED);
+ if (error == kBadAuthenticationError) {
+ return GoogleServiceAuthError(
+ GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
+ }
if (error == kServiceUnavailableError) {
return GoogleServiceAuthError(
GoogleServiceAuthError::SERVICE_UNAVAILABLE);
}
+ LOG(WARNING) << "Incomprehensible response from Google Accounts servers.";
return GoogleServiceAuthError(
- GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
+ GoogleServiceAuthError::SERVICE_UNAVAILABLE);
John Gregg 2010/12/01 00:58:15 Neither one of these is natural as the default. I
Chris Masone 2010/12/01 16:51:26 I dunno...it seems to me that what this means is w
John Gregg 2010/12/02 19:02:16 I was thinking SERVICE_UNAVAILABLE implies "try ag
Chris Masone 2010/12/02 22:59:49 We've seen this in a captive portal situation as w
}
NOTREACHED();
« no previous file with comments | « chrome/common/net/gaia/gaia_auth_fetcher.h ('k') | chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698