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

Side by Side Diff: chrome/browser/search_engines/template_url_fetcher.cc

Issue 7006005: Move UrlFetcher to content. I originally thought that it's only used by chrome code, but turns o... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix linux Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager.h ('k') | chrome/browser/spellcheck_host_impl.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/search_engines/template_url_fetcher.h" 7 #include "chrome/browser/search_engines/template_url_fetcher.h"
8 8
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/search_engines/template_url.h" 12 #include "chrome/browser/search_engines/template_url.h"
13 #include "chrome/browser/search_engines/template_url_fetcher_callbacks.h" 13 #include "chrome/browser/search_engines/template_url_fetcher_callbacks.h"
14 #include "chrome/browser/search_engines/template_url_model.h" 14 #include "chrome/browser/search_engines/template_url_model.h"
15 #include "chrome/browser/search_engines/template_url_parser.h" 15 #include "chrome/browser/search_engines/template_url_parser.h"
16 #include "chrome/common/net/url_fetcher.h"
17 #include "content/common/notification_observer.h" 16 #include "content/common/notification_observer.h"
18 #include "content/common/notification_registrar.h" 17 #include "content/common/notification_registrar.h"
19 #include "content/common/notification_source.h" 18 #include "content/common/notification_source.h"
20 #include "content/common/notification_type.h" 19 #include "content/common/notification_type.h"
20 #include "content/common/url_fetcher.h"
21 #include "net/url_request/url_request_status.h" 21 #include "net/url_request/url_request_status.h"
22 22
23 // RequestDelegate ------------------------------------------------------------ 23 // RequestDelegate ------------------------------------------------------------
24 class TemplateURLFetcher::RequestDelegate : public URLFetcher::Delegate, 24 class TemplateURLFetcher::RequestDelegate : public URLFetcher::Delegate,
25 public NotificationObserver { 25 public NotificationObserver {
26 public: 26 public:
27 // Takes ownership of |callbacks|. 27 // Takes ownership of |callbacks|.
28 RequestDelegate(TemplateURLFetcher* fetcher, 28 RequestDelegate(TemplateURLFetcher* fetcher,
29 const string16& keyword, 29 const string16& keyword,
30 const GURL& osdd_url, 30 const GURL& osdd_url,
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 new RequestDelegate(this, keyword, osdd_url, favicon_url, 319 new RequestDelegate(this, keyword, osdd_url, favicon_url,
320 owned_callbacks.release(), provider_type)); 320 owned_callbacks.release(), provider_type));
321 } 321 }
322 322
323 void TemplateURLFetcher::RequestCompleted(RequestDelegate* request) { 323 void TemplateURLFetcher::RequestCompleted(RequestDelegate* request) {
324 DCHECK(find(requests_->begin(), requests_->end(), request) != 324 DCHECK(find(requests_->begin(), requests_->end(), request) !=
325 requests_->end()); 325 requests_->end());
326 requests_->erase(find(requests_->begin(), requests_->end(), request)); 326 requests_->erase(find(requests_->begin(), requests_->end(), request));
327 delete request; 327 delete request;
328 } 328 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager.h ('k') | chrome/browser/spellcheck_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698