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

Side by Side Diff: components/search_engines/template_url_fetcher.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, 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 unified diff | Download patch
« no previous file with comments | « components/rappor/log_uploader.cc ('k') | components/search_provider_logos/logo_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "components/search_engines/template_url_fetcher.h" 7 #include "components/search_engines/template_url_fetcher.h"
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 }; 62 };
63 63
64 TemplateURLFetcher::RequestDelegate::RequestDelegate( 64 TemplateURLFetcher::RequestDelegate::RequestDelegate(
65 TemplateURLFetcher* fetcher, 65 TemplateURLFetcher* fetcher,
66 const base::string16& keyword, 66 const base::string16& keyword,
67 const GURL& osdd_url, 67 const GURL& osdd_url,
68 const GURL& favicon_url, 68 const GURL& favicon_url,
69 const URLFetcherCustomizeCallback& url_fetcher_customize_callback, 69 const URLFetcherCustomizeCallback& url_fetcher_customize_callback,
70 const ConfirmAddSearchProviderCallback& confirm_add_callback, 70 const ConfirmAddSearchProviderCallback& confirm_add_callback,
71 ProviderType provider_type) 71 ProviderType provider_type)
72 : url_fetcher_(net::URLFetcher::Create( 72 : url_fetcher_(
73 osdd_url, net::URLFetcher::GET, this)), 73 net::URLFetcher::Create(osdd_url, net::URLFetcher::GET, this).Pass()),
74 fetcher_(fetcher), 74 fetcher_(fetcher),
75 keyword_(keyword), 75 keyword_(keyword),
76 osdd_url_(osdd_url), 76 osdd_url_(osdd_url),
77 favicon_url_(favicon_url), 77 favicon_url_(favicon_url),
78 provider_type_(provider_type), 78 provider_type_(provider_type),
79 confirm_add_callback_(confirm_add_callback) { 79 confirm_add_callback_(confirm_add_callback) {
80 TemplateURLService* model = fetcher_->template_url_service_; 80 TemplateURLService* model = fetcher_->template_url_service_;
81 DCHECK(model); // TemplateURLFetcher::ScheduleDownload verifies this. 81 DCHECK(model); // TemplateURLFetcher::ScheduleDownload verifies this.
82 82
83 if (!model->loaded()) { 83 if (!model->loaded()) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 confirm_add_callback, provider_type)); 256 confirm_add_callback, provider_type));
257 } 257 }
258 258
259 void TemplateURLFetcher::RequestCompleted(RequestDelegate* request) { 259 void TemplateURLFetcher::RequestCompleted(RequestDelegate* request) {
260 Requests::iterator i = 260 Requests::iterator i =
261 std::find(requests_.begin(), requests_.end(), request); 261 std::find(requests_.begin(), requests_.end(), request);
262 DCHECK(i != requests_.end()); 262 DCHECK(i != requests_.end());
263 requests_.weak_erase(i); 263 requests_.weak_erase(i);
264 delete request; 264 delete request;
265 } 265 }
OLDNEW
« no previous file with comments | « components/rappor/log_uploader.cc ('k') | components/search_provider_logos/logo_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698