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

Unified Diff: remoting/host/gaia_oauth_client.cc

Issue 10069020: Log Gaia response codes to ease diagnostics of networking issues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding a missing dependency. Created 8 years, 8 months 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 | « no previous file | remoting/host/url_request_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/gaia_oauth_client.cc
diff --git a/remoting/host/gaia_oauth_client.cc b/remoting/host/gaia_oauth_client.cc
index 0412ae05106f9ad39052850288d7b9122edf0b1b..63c786928e89f921f3b6a59e27325970f18e7b46 100644
--- a/remoting/host/gaia_oauth_client.cc
+++ b/remoting/host/gaia_oauth_client.cc
@@ -135,6 +135,7 @@ void GaiaOAuthClient::Core::HandleResponse(
// RC_BAD_REQUEST means the arguments are invalid. No point retrying. We are
// done here.
if (source->GetResponseCode() == net::HTTP_BAD_REQUEST) {
+ LOG(ERROR) << "Gaia response: response code=net::HTTP_BAD_REQUEST.";
delegate_->OnOAuthError();
return;
}
@@ -153,6 +154,11 @@ void GaiaOAuthClient::Core::HandleResponse(
response_dict->GetString(kRefreshTokenValue, &refresh_token);
response_dict->GetInteger(kExpiresInValue, &expires_in_seconds);
}
+ VLOG(1) << "Gaia response: acess_token='" << access_token
+ << "', refresh_token='" << refresh_token
+ << "', expires in " << expires_in_seconds << " second(s)";
+ } else {
+ LOG(ERROR) << "Gaia response: response code=" << source->GetResponseCode();
}
if (access_token.empty()) {
// If we don't have an access token yet and the the error was not
« no previous file with comments | « no previous file | remoting/host/url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698