Index: components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h |
diff --git a/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h b/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h |
index ad1e9e997e72e28f26d34f27bc25656fc627a628..81b5f70dbdfccfb4c9b31f2289a0bb31ca6eae3c 100644 |
--- a/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h |
+++ b/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h |
@@ -36,18 +36,30 @@ class IOSImageDataFetcherWrapper { |
const scoped_refptr<base::TaskRunner>& task_runner); |
virtual ~IOSImageDataFetcherWrapper(); |
- // Start downloading the image at the given |image_url|. The |callback| will |
- // be called with the downloaded image, or nil if any error happened or the |
- // http response header is not HTTP_OK (200). If the url is a data URL, the |
- // http response header is considered to be HTTP_OK. |
- // |callback| cannot be nil. |
+ // Helper to start downloading and possibly decoding the image without a |
+ // referrer. |
virtual void FetchImageDataWebpDecoded(const GURL& image_url, |
IOSImageDataFetcherCallback callback); |
+ // Start downloading the image at the given |image_url|. The |callback| will |
+ // be called with the downloaded image, or nil if any error happened. If the |
+ // image is WebP it will be decoded. |
+ // The |referrer| and |referrer_policy| will be passed on to the underlying |
+ // URLFetcher. |
+ // |callback| cannot be nil. |
+ void FetchImageDataWebpDecoded( |
+ const GURL& image_url, |
+ IOSImageDataFetcherCallback callback, |
+ const std::string& referrer, |
+ net::URLRequest::ReferrerPolicy referrer_policy); |
+ |
// Sets a service name against which to track data usage. |
void SetDataUseServiceName(DataUseServiceName data_use_service_name); |
private: |
+ ImageDataFetcher::ImageDataFetcherCallback CallbackForImageDataFetcher( |
+ IOSImageDataFetcherCallback callback); |
+ |
// The task runner used to decode images if necessary. |
const scoped_refptr<base::TaskRunner> task_runner_; |
ImageDataFetcher image_data_fetcher_; |