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

Unified Diff: google_apis/gaia/gaia_oauth_client.cc

Issue 16288003: Update google_apis/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_oauth_client.cc
diff --git a/google_apis/gaia/gaia_oauth_client.cc b/google_apis/gaia/gaia_oauth_client.cc
index a9bae4f36bfe807186d6a912ab1be7ecf2d61de5..b218840bd05c8040121a853cf5ab9fcd53350a4d 100644
--- a/google_apis/gaia/gaia_oauth_client.cc
+++ b/google_apis/gaia/gaia_oauth_client.cc
@@ -125,9 +125,8 @@ void GaiaOAuthClient::Core::GetUserInfo(const std::string& oauth_access_token,
request_.reset(net::URLFetcher::Create(
0, GURL(GaiaUrls::GetInstance()->oauth_user_info_url()),
net::URLFetcher::GET, this));
- request_->SetRequestContext(request_context_getter_);
- request_->AddExtraRequestHeader(
- "Authorization: OAuth " + oauth_access_token);
+ request_->SetRequestContext(request_context_getter_.get());
+ request_->AddExtraRequestHeader("Authorization: OAuth " + oauth_access_token);
request_->SetMaxRetriesOn5xx(max_retries);
// Fetchers are sometimes cancelled because a network change was detected,
// especially at startup and after sign-in on ChromeOS. Retrying once should
@@ -146,7 +145,7 @@ void GaiaOAuthClient::Core::MakeGaiaRequest(
num_retries_ = 0;
request_.reset(net::URLFetcher::Create(
0, gaia_url_, net::URLFetcher::POST, this));
- request_->SetRequestContext(request_context_getter_);
+ request_->SetRequestContext(request_context_getter_.get());
request_->SetUploadData("application/x-www-form-urlencoded", post_body);
request_->SetMaxRetriesOn5xx(max_retries);
// See comment on SetAutomaticallyRetryOnNetworkChanges() above.
@@ -168,7 +167,7 @@ void GaiaOAuthClient::Core::OnURLFetchComplete(
num_retries_++;
// We must set our request_context_getter_ again because
// URLFetcher::Core::RetryOrCompleteUrlFetch resets it to NULL...
- request_->SetRequestContext(request_context_getter_);
+ request_->SetRequestContext(request_context_getter_.get());
request_->Start();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698