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

Unified Diff: content/renderer/image_loading_helper.cc

Issue 934693002: Reload favicon from HTTP cache on Ctrl+Refresh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: content/renderer/image_loading_helper.cc
diff --git a/content/renderer/image_loading_helper.cc b/content/renderer/image_loading_helper.cc
index 7b7982ab8058b2acb72737426fe0139c95168985..df9c8e065eba8369fe22112ab100802e8e303771 100644
--- a/content/renderer/image_loading_helper.cc
+++ b/content/renderer/image_loading_helper.cc
@@ -104,10 +104,12 @@ ImageLoadingHelper::ImageLoadingHelper(RenderFrame* render_frame)
ImageLoadingHelper::~ImageLoadingHelper() {
}
-void ImageLoadingHelper::OnDownloadImage(int id,
- const GURL& image_url,
- bool is_favicon,
- uint32_t max_image_size) {
+void ImageLoadingHelper::OnDownloadImage(
+ int id,
+ const GURL& image_url,
+ bool is_favicon,
+ uint32_t max_image_size,
+ blink::WebURLRequest::CachePolicy cache_policy) {
std::vector<SkBitmap> result_images;
std::vector<gfx::Size> result_original_image_sizes;
if (image_url.SchemeIs(url::kDataScheme)) {
@@ -118,7 +120,8 @@ void ImageLoadingHelper::OnDownloadImage(int id,
gfx::Size(data_image.width(), data_image.height()));
}
} else {
- if (DownloadImage(id, image_url, is_favicon, max_image_size)) {
+ if (DownloadImage(id, image_url, is_favicon, max_image_size,
+ cache_policy)) {
// Will complete asynchronously via ImageLoadingHelper::DidDownloadImage
return;
}
@@ -132,10 +135,12 @@ void ImageLoadingHelper::OnDownloadImage(int id,
result_original_image_sizes));
}
-bool ImageLoadingHelper::DownloadImage(int id,
- const GURL& image_url,
- bool is_favicon,
- uint32_t max_image_size) {
+bool ImageLoadingHelper::DownloadImage(
+ int id,
+ const GURL& image_url,
+ bool is_favicon,
+ uint32_t max_image_size,
+ blink::WebURLRequest::CachePolicy cache_policy) {
// Create an image resource fetcher and assign it with a call back object.
image_fetchers_.push_back(new MultiResolutionImageResourceFetcher(
image_url,
@@ -143,6 +148,7 @@ bool ImageLoadingHelper::DownloadImage(int id,
id,
is_favicon ? WebURLRequest::RequestContextFavicon
: WebURLRequest::RequestContextImage,
+ cache_policy,
base::Bind(&ImageLoadingHelper::DidDownloadImage,
base::Unretained(this),
max_image_size)));

Powered by Google App Engine
This is Rietveld 408576698