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

Unified Diff: components/history/core/browser/web_history_service.cc

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded Pass() calls Created 5 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
Index: components/history/core/browser/web_history_service.cc
diff --git a/components/history/core/browser/web_history_service.cc b/components/history/core/browser/web_history_service.cc
index 91b498c9474ec0bc662364e175057f0ae913586e..4a8b3aa7f3d5953e2709dfeffd24a2110411d891 100644
--- a/components/history/core/browser/web_history_service.cc
+++ b/components/history/core/browser/web_history_service.cc
@@ -139,7 +139,7 @@ class RequestImpl : public WebHistoryService::Request,
UMA_HISTOGRAM_BOOLEAN("WebHistory.OAuthTokenCompletion", true);
// Got an access token -- start the actual API request.
- url_fetcher_.reset(CreateUrlFetcher(access_token));
+ url_fetcher_ = CreateUrlFetcher(access_token);
url_fetcher_->Start();
}
@@ -156,11 +156,12 @@ class RequestImpl : public WebHistoryService::Request,
}
// Helper for creating a new URLFetcher for the API request.
- net::URLFetcher* CreateUrlFetcher(const std::string& access_token) {
+ scoped_ptr<net::URLFetcher> CreateUrlFetcher(
+ const std::string& access_token) {
net::URLFetcher::RequestType request_type = post_data_.empty() ?
net::URLFetcher::GET : net::URLFetcher::POST;
- net::URLFetcher* fetcher = net::URLFetcher::Create(
- url_, request_type, this);
+ scoped_ptr<net::URLFetcher> fetcher =
+ net::URLFetcher::Create(url_, request_type, this);
fetcher->SetRequestContext(request_context_.get());
fetcher->SetMaxRetriesOn5xx(kMaxRetries);
fetcher->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
« no previous file with comments | « components/google/core/browser/google_url_tracker.cc ('k') | components/invalidation/gcm_network_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698