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

Unified Diff: chrome/browser/bitmap_fetcher/bitmap_fetcher.h

Issue 1097383005: Add possibility to define data callback to BitmapFetcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@r479598_extensions_content_verifier_directories_fail
Patch Set: Clarified how calling Init/Start twice works + fixed android Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/banners/app_banner_data_fetcher.cc ('k') | chrome/browser/bitmap_fetcher/bitmap_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bitmap_fetcher/bitmap_fetcher.h
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher.h b/chrome/browser/bitmap_fetcher/bitmap_fetcher.h
index 11055eaf61a50e8aaf7a051e629858c5435e7de5..6307e5b8edb6e63639b6dd61fb848b62b15152db 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher.h
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher.h
@@ -29,17 +29,24 @@ class BitmapFetcher : public net::URLFetcherDelegate,
~BitmapFetcher() override;
const GURL& url() const { return url_; }
+ net::URLFetcher* url_fetcher() { return url_fetcher_.get(); }
+
+ // Initializes internal fetcher. After this function returns url_fetcher()
+ // can be accessed to configure it further (eg. add user data to request).
+ // All configuration must be done before Start() is called.
+ // Values for |load_flags| are defined in net/base/load_flags.h. In general,
+ // |net::LOAD_NORMAL| is appropriate. Init may be called more than once in
+ // some cases. If so, subsequent starts will be ignored.
+ void Init(net::URLRequestContextGetter* request_context,
+ const std::string& referrer,
+ net::URLRequest::ReferrerPolicy referrer_policy,
+ int load_flags);
// Start fetching the URL with the fetcher. The delegate is notified
// asynchronously when done. Start may be called more than once in some
// cases. If so, subsequent starts will be ignored since the operation is
- // already in progress. Arguments are used to configure the internal fetcher.
- // Values for |load_flags| are defined in net/base/load_flags.h. In general,
- // |net::LOAD_NORMAL| is appropriate.
- void Start(net::URLRequestContextGetter* request_context,
- const std::string& referrer,
- net::URLRequest::ReferrerPolicy referrer_policy,
- int load_flags);
+ // already in progress.
+ void Start();
// Methods inherited from URLFetcherDelegate
« no previous file with comments | « chrome/browser/banners/app_banner_data_fetcher.cc ('k') | chrome/browser/bitmap_fetcher/bitmap_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698