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

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

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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"
(...skipping 26 matching lines...) Expand all
37 const string16& keyword, 37 const string16& keyword,
38 const GURL& osdd_url, 38 const GURL& osdd_url,
39 const GURL& favicon_url, 39 const GURL& favicon_url,
40 content::WebContents* web_contents, 40 content::WebContents* web_contents,
41 TemplateURLFetcherCallbacks* callbacks, 41 TemplateURLFetcherCallbacks* callbacks,
42 ProviderType provider_type); 42 ProviderType provider_type);
43 43
44 // content::NotificationObserver: 44 // content::NotificationObserver:
45 virtual void Observe(int type, 45 virtual void Observe(int type,
46 const content::NotificationSource& source, 46 const content::NotificationSource& source,
47 const content::NotificationDetails& details); 47 const content::NotificationDetails& details) OVERRIDE;
48 48
49 // net::URLFetcherDelegate: 49 // net::URLFetcherDelegate:
50 // If data contains a valid OSDD, a TemplateURL is created and added to 50 // If data contains a valid OSDD, a TemplateURL is created and added to
51 // the TemplateURLService. 51 // the TemplateURLService.
52 virtual void OnURLFetchComplete(const net::URLFetcher* source); 52 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
53 53
54 // URL of the OSDD. 54 // URL of the OSDD.
55 GURL url() const { return osdd_url_; } 55 GURL url() const { return osdd_url_; }
56 56
57 // Keyword to use. 57 // Keyword to use.
58 string16 keyword() const { return keyword_; } 58 string16 keyword() const { return keyword_; }
59 59
60 // The type of search provider being fetched. 60 // The type of search provider being fetched.
61 ProviderType provider_type() const { return provider_type_; } 61 ProviderType provider_type() const { return provider_type_; }
62 62
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 owned_callbacks.release(), provider_type)); 288 owned_callbacks.release(), provider_type));
289 } 289 }
290 290
291 void TemplateURLFetcher::RequestCompleted(RequestDelegate* request) { 291 void TemplateURLFetcher::RequestCompleted(RequestDelegate* request) {
292 Requests::iterator i = 292 Requests::iterator i =
293 std::find(requests_.begin(), requests_.end(), request); 293 std::find(requests_.begin(), requests_.end(), request);
294 DCHECK(i != requests_.end()); 294 DCHECK(i != requests_.end());
295 requests_.weak_erase(i); 295 requests_.weak_erase(i);
296 delete request; 296 delete request;
297 } 297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698