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

Unified Diff: chrome/browser/net/gaia/gaia_oauth_fetcher.cc

Issue 8761016: Shaving parallel authenticator yak to remove unnecessary dependency on this class from OAuth spec... (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/net/gaia/gaia_oauth_fetcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/gaia/gaia_oauth_fetcher.cc
===================================================================
--- chrome/browser/net/gaia/gaia_oauth_fetcher.cc (revision 112673)
+++ chrome/browser/net/gaia/gaia_oauth_fetcher.cc (working copy)
@@ -461,7 +461,8 @@
// static
GoogleServiceAuthError GaiaOAuthFetcher::GenerateAuthError(
const std::string& data,
- const net::URLRequestStatus& status) {
+ const net::URLRequestStatus& status,
+ int response_code) {
if (!status.is_success()) {
if (status.status() == net::URLRequestStatus::CANCELED) {
return GoogleServiceAuthError(GoogleServiceAuthError::REQUEST_CANCELED);
@@ -471,7 +472,8 @@
return GoogleServiceAuthError::FromConnectionError(status.error());
}
} else {
- LOG(WARNING) << "Unrecognized response from Google Accounts servers.";
+ LOG(WARNING) << "Unrecognized response from Google Accounts servers "
+ << "code " << response_code << " data " << data;
return GoogleServiceAuthError(
GoogleServiceAuthError::SERVICE_UNAVAILABLE);
}
@@ -606,7 +608,8 @@
StartOAuthWrapBridge(
token, secret, GaiaConstants::kGaiaOAuthDuration, service_scope_);
} else {
- consumer_->OnOAuthGetAccessTokenFailure(GenerateAuthError(data, status));
+ consumer_->OnOAuthGetAccessTokenFailure(GenerateAuthError(data, status,
+ response_code));
}
}
@@ -624,7 +627,8 @@
StartUserInfo(token);
} else {
consumer_->OnOAuthWrapBridgeFailure(service_scope_,
- GenerateAuthError(data, status));
+ GenerateAuthError(data, status,
+ response_code));
}
}
@@ -636,7 +640,8 @@
consumer_->OnOAuthRevokeTokenSuccess();
} else {
LOG(ERROR) << "Token revocation failure " << response_code << ": " << data;
- consumer_->OnOAuthRevokeTokenFailure(GenerateAuthError(data, status));
+ consumer_->OnOAuthRevokeTokenFailure(GenerateAuthError(data, status,
+ response_code));
}
}
@@ -650,7 +655,8 @@
VLOG(1) << "GAIA user info fetched for " << email << ".";
consumer_->OnUserInfoSuccess(email);
} else {
- consumer_->OnUserInfoFailure(GenerateAuthError(data, status));
+ consumer_->OnUserInfoFailure(GenerateAuthError(data, status,
+ response_code));
}
}
« no previous file with comments | « chrome/browser/net/gaia/gaia_oauth_fetcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698