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

Unified Diff: components/suggestions/suggestions_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/suggestions/suggestions_service.cc
diff --git a/components/suggestions/suggestions_service.cc b/components/suggestions/suggestions_service.cc
index dbc70368b15cc6e421e15bc3c64e0c14bd012586..c301c6ebedfb3fee3d7f2c8a780b4648fda0a9f5 100644
--- a/components/suggestions/suggestions_service.cc
+++ b/components/suggestions/suggestions_service.cc
@@ -219,13 +219,14 @@ void SuggestionsService::IssueRequestIfNoneOngoing(const GURL& url) {
if (pending_request_.get()) {
return;
}
- pending_request_.reset(CreateSuggestionsRequest(url));
+ pending_request_ = CreateSuggestionsRequest(url);
pending_request_->Start();
last_request_started_time_ = TimeTicks::Now();
}
-net::URLFetcher* SuggestionsService::CreateSuggestionsRequest(const GURL& url) {
- net::URLFetcher* request =
+scoped_ptr<net::URLFetcher> SuggestionsService::CreateSuggestionsRequest(
+ const GURL& url) {
+ scoped_ptr<net::URLFetcher> request =
net::URLFetcher::Create(0, url, net::URLFetcher::GET, this);
request->SetLoadFlags(net::LOAD_DISABLE_CACHE);
request->SetRequestContext(url_request_context_);
« no previous file with comments | « components/suggestions/suggestions_service.h ('k') | components/translate/core/browser/translate_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698