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

Unified Diff: components/search_engines/template_url_fetcher.h

Issue 1951153002: Remove AddSearchProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: obsolescence date Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/base/test_browser_window.h ('k') | components/search_engines/template_url_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/template_url_fetcher.h
diff --git a/components/search_engines/template_url_fetcher.h b/components/search_engines/template_url_fetcher.h
index 26a1515213600d90b5b3b343697cea1b1c499f7b..f229a4ea0b222fd1c71dcff3aab230fa4fdb4302 100644
--- a/components/search_engines/template_url_fetcher.h
+++ b/components/search_engines/template_url_fetcher.h
@@ -31,13 +31,6 @@ class TemplateURLFetcher : public KeyedService {
public:
typedef base::Callback<void(
net::URLFetcher* url_fetcher)> URLFetcherCustomizeCallback;
- typedef base::Callback<void(std::unique_ptr<TemplateURL> template_url)>
- ConfirmAddSearchProviderCallback;
-
- enum ProviderType {
- AUTODETECTED_PROVIDER,
- EXPLICIT_PROVIDER // Supplied by Javascript.
- };
// Creates a TemplateURLFetcher.
TemplateURLFetcher(TemplateURLService* template_url_service,
@@ -48,11 +41,9 @@ class TemplateURLFetcher : public KeyedService {
// it is downloaded. If successful and the result can be parsed, a TemplateURL
// is added to the TemplateURLService.
//
- // If |provider_type| is AUTODETECTED_PROVIDER, |keyword| must be non-empty,
- // and if there's already a non-replaceable TemplateURL in the model for
- // |keyword|, or we're already downloading an OSDD for this keyword, no
- // download is started. If |provider_type| is EXPLICIT_PROVIDER, |keyword| is
- // ignored.
+ // |keyword| must be non-empty. If there's already a non-replaceable
+ // TemplateURL in the model for |keyword|, or we're already downloading an
+ // OSDD for this keyword, no download is started.
//
// If |url_fetcher_customize_callback| is not null, it's run after a
// URLFetcher is created. This callback can be used to set additional
@@ -61,24 +52,24 @@ class TemplateURLFetcher : public KeyedService {
const base::string16& keyword,
const GURL& osdd_url,
const GURL& favicon_url,
- const URLFetcherCustomizeCallback& url_fetcher_customize_callback,
- const ConfirmAddSearchProviderCallback& confirm_add_callback,
- ProviderType provider_type);
+ const URLFetcherCustomizeCallback& url_fetcher_customize_callback);
// The current number of outstanding requests.
int requests_count() const { return requests_.size(); }
- private:
+ protected:
// A RequestDelegate is created to download each OSDD. When done downloading
// RequestCompleted is invoked back on the TemplateURLFetcher.
class RequestDelegate;
+
+ // Invoked from the RequestDelegate when done downloading. Virtual for tests.
+ virtual void RequestCompleted(RequestDelegate* request);
+
+ private:
friend class RequestDelegate;
typedef ScopedVector<RequestDelegate> Requests;
- // Invoked from the RequestDelegate when done downloading.
- void RequestCompleted(RequestDelegate* request);
-
TemplateURLService* template_url_service_;
scoped_refptr<net::URLRequestContextGetter> request_context_;
« no previous file with comments | « chrome/test/base/test_browser_window.h ('k') | components/search_engines/template_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698