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; |