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

Unified Diff: chrome/browser/search_engines/template_url_fetcher.h

Issue 371333003: No content dependencies in TemplateURLFetcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | chrome/browser/search_engines/template_url_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(); }
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698