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

Unified Diff: components/image_fetcher/ios/ios_image_data_fetcher_wrapper.mm

Issue 2674653003: Use IOSImageDataFetcherWrapper in BrowserViewController (Closed)
Patch Set: Address comments Created 3 years, 10 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/ios/ios_image_data_fetcher_wrapper.mm
diff --git a/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.mm b/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.mm
index 6bf24c690c545a74e944eada8636b97af9fa2669..9e105d262002fc9539a6075e85260c2be7d1199e 100644
--- a/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.mm
+++ b/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.mm
@@ -86,6 +86,15 @@ IOSImageDataFetcherWrapper::~IOSImageDataFetcherWrapper() {}
void IOSImageDataFetcherWrapper::FetchImageDataWebpDecoded(
const GURL& image_url,
IOSImageDataFetcherCallback callback) {
+ IOSImageDataFetcherWrapper::FetchImageDataWebpDecoded(
+ image_url, callback, std::string(),
+ net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE);
Marc Treib 2017/02/03 14:10:30 ...and a second place where it's baked in. IMO thi
gambard 2017/02/03 14:56:47 I have changed the interface. Maybe it makes more
Marc Treib 2017/02/03 15:06:45 Yep, I think that's a bit better, thanks! At some
gambard 2017/02/03 15:11:14 Actually no :) There are two usages of image fetch
+}
+void IOSImageDataFetcherWrapper::FetchImageDataWebpDecoded(
Marc Treib 2017/02/03 14:10:30 nit: empty line before
gambard 2017/02/03 14:56:47 Done.
+ const GURL& image_url,
+ IOSImageDataFetcherCallback callback,
+ const std::string& referrer,
+ net::URLRequest::ReferrerPolicy referrer_policy) {
DCHECK(callback);
scoped_refptr<base::TaskRunner> task_runner = task_runner_;
@@ -107,7 +116,8 @@ void IOSImageDataFetcherWrapper::FetchImageDataWebpDecoded(
base::Bind(&DecodeWebpImage, data),
base::BindBlockArc(callback));
});
- image_data_fetcher_.FetchImageData(image_url, local_callback);
+ image_data_fetcher_.FetchImageData(image_url, local_callback, referrer,
+ referrer_policy);
}
void IOSImageDataFetcherWrapper::SetDataUseServiceName(

Powered by Google App Engine
This is Rietveld 408576698