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

Side by Side Diff: content/renderer/image_downloader/image_downloader_impl.cc

Issue 1846733004: Rename IgnoringCacheData to ValidatingCacheData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « content/child/web_url_request_util.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/image_downloader/image_downloader_impl.h" 5 #include "content/renderer/image_downloader/image_downloader_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 uint32_t max_image_size, 169 uint32_t max_image_size,
170 bool bypass_cache, 170 bool bypass_cache,
171 const DownloadImageCallback& callback) { 171 const DownloadImageCallback& callback) {
172 blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); 172 blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
173 DCHECK(frame); 173 DCHECK(frame);
174 174
175 // Create an image resource fetcher and assign it with a call back object. 175 // Create an image resource fetcher and assign it with a call back object.
176 image_fetchers_.push_back(new MultiResolutionImageResourceFetcher( 176 image_fetchers_.push_back(new MultiResolutionImageResourceFetcher(
177 image_url, frame, 0, is_favicon ? WebURLRequest::RequestContextFavicon 177 image_url, frame, 0, is_favicon ? WebURLRequest::RequestContextFavicon
178 : WebURLRequest::RequestContextImage, 178 : WebURLRequest::RequestContextImage,
179 bypass_cache ? WebURLRequest::ReloadBypassingCache 179 bypass_cache ? WebURLRequest::BypassingCache
180 : WebURLRequest::UseProtocolCachePolicy, 180 : WebURLRequest::UseProtocolCachePolicy,
181 base::Bind(&ImageDownloaderImpl::DidFetchImage, base::Unretained(this), 181 base::Bind(&ImageDownloaderImpl::DidFetchImage, base::Unretained(this),
182 max_image_size, callback))); 182 max_image_size, callback)));
183 return true; 183 return true;
184 } 184 }
185 185
186 void ImageDownloaderImpl::DidFetchImage( 186 void ImageDownloaderImpl::DidFetchImage(
187 uint32_t max_image_size, 187 uint32_t max_image_size,
188 const DownloadImageCallback& callback, 188 const DownloadImageCallback& callback,
189 MultiResolutionImageResourceFetcher* fetcher, 189 MultiResolutionImageResourceFetcher* fetcher,
(...skipping 20 matching lines...) Expand all
210 int32_t http_status_code, 210 int32_t http_status_code,
211 const std::vector<SkBitmap>& result_images, 211 const std::vector<SkBitmap>& result_images,
212 const std::vector<gfx::Size>& result_original_image_sizes, 212 const std::vector<gfx::Size>& result_original_image_sizes,
213 const DownloadImageCallback& callback) { 213 const DownloadImageCallback& callback) {
214 callback.Run(http_status_code, 214 callback.Run(http_status_code,
215 mojo::Array<skia::mojom::BitmapPtr>::From(result_images), 215 mojo::Array<skia::mojom::BitmapPtr>::From(result_images),
216 mojo::Array<mojo::SizePtr>::From(result_original_image_sizes)); 216 mojo::Array<mojo::SizePtr>::From(result_original_image_sizes));
217 } 217 }
218 218
219 } // namespace content 219 } // namespace content
OLDNEW
« no previous file with comments | « content/child/web_url_request_util.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698