Index: chrome/browser/search_engines/template_url_fetcher.h |
diff --git a/chrome/browser/search_engines/template_url_fetcher.h b/chrome/browser/search_engines/template_url_fetcher.h |
index df66ba489966bf83578bff965e0bce20611e2b24..03e7d957c136f6d41d4e181c866b10cba350e528 100644 |
--- a/chrome/browser/search_engines/template_url_fetcher.h |
+++ b/chrome/browser/search_engines/template_url_fetcher.h |
@@ -16,11 +16,8 @@ class GURL; |
class TemplateURL; |
class TemplateURLService; |
-namespace content { |
-class WebContents; |
-} |
- |
namespace net { |
+class URLFetcher; |
class URLRequestContextGetter; |
} |
@@ -31,6 +28,8 @@ class URLRequestContextGetter; |
class TemplateURLFetcher : public KeyedService { |
public: |
typedef base::Callback<void( |
+ net::URLFetcher* url_fetcher)> URLFetcherCustomizeCallback; |
+ typedef base::Callback<void( |
scoped_ptr<TemplateURL> template_url)> ConfirmAddSearchProviderCallback; |
enum ProviderType { |
@@ -45,7 +44,7 @@ class TemplateURLFetcher : public KeyedService { |
// If TemplateURLFetcher is not already downloading the OSDD for osdd_url, |
// it is downloaded. If successful and the result can be parsed, a TemplateURL |
- // is added to the TemplateURLService. Takes ownership of |callbacks|. |
+ // 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 |
@@ -53,14 +52,16 @@ class TemplateURLFetcher : public KeyedService { |
// download is started. If |provider_type| is EXPLICIT_PROVIDER, |keyword| is |
// ignored. |
// |
- // |web_contents| specifies which WebContents displays the page the OSDD is |
- // downloaded for. |web_contents| must not be NULL, except during tests. |
- void ScheduleDownload(const base::string16& keyword, |
- const GURL& osdd_url, |
- const GURL& favicon_url, |
- content::WebContents* web_contents, |
- const ConfirmAddSearchProviderCallback& callback, |
- ProviderType provider_type); |
+ // If |url_fetcher_customize_callback| is not null, it's run after a |
+ // URLFetcher is created. This callback can be used to set additional |
+ // parameters to the URLFetcher. |
Peter Kasting
2014/07/09 01:00:51
Nit: to -> on
hashimoto
2014/07/09 02:52:26
Done.
|
+ void ScheduleDownload( |
+ 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); |
// The current number of outstanding requests. |
int requests_count() const { return requests_.size(); } |