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

Unified Diff: components/image_fetcher/image_data_fetcher.h

Issue 2674653003: Use IOSImageDataFetcherWrapper in BrowserViewController (Closed)
Patch Set: Created 3 years, 11 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
Index: components/image_fetcher/image_data_fetcher.h
diff --git a/components/image_fetcher/image_data_fetcher.h b/components/image_fetcher/image_data_fetcher.h
index 92c5a5cf0dc233d7c004adc58387f336115361bf..b2775ff829c7ff88d3e27004754282d554787a67 100644
--- a/components/image_fetcher/image_data_fetcher.h
+++ b/components/image_fetcher/image_data_fetcher.h
@@ -14,6 +14,7 @@
#include "base/memory/ref_counted.h"
#include "components/data_use_measurement/core/data_use_user_data.h"
#include "net/url_request/url_fetcher_delegate.h"
+#include "net/url_request/url_request.h"
#include "url/gurl.h"
namespace net {
@@ -37,11 +38,19 @@ class ImageDataFetcher : public net::URLFetcherDelegate {
// Sets a service name against which to track data usage.
void SetDataUseServiceName(DataUseServiceName data_use_service_name);
+ // Helper to fetches images data without a referrer.
Marc Treib 2017/02/02 15:19:13 s/fetches images/fetch image/ Though I might do t
gambard 2017/02/03 12:11:34 Done.
+ void FetchImageData(const GURL& image_url,
+ const ImageDataFetcherCallback& callback);
+
// Fetches the raw image bytes from the given |image_url| and calls the given
// |callback|. The callback is run even if fetching the URL fails. In case
// of an error an empty string is passed to the callback.
+ // The |referrer| and |referrer_policy| will be passed on to the underlying
+ // URLFetcher.
void FetchImageData(const GURL& image_url,
- const ImageDataFetcherCallback& callback);
+ const ImageDataFetcherCallback& callback,
+ const std::string& referrer,
+ net::URLRequest::ReferrerPolicy referrer_policy);
private:
struct ImageDataFetcherRequest;
« no previous file with comments | « no previous file | components/image_fetcher/image_data_fetcher.cc » ('j') | components/image_fetcher/image_data_fetcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698