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

Unified Diff: content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc

Issue 16358002: Allow MultiResolutionImageFetcher to fetch image from file:/// protocol (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove static_cast usage Created 7 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc
diff --git a/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc
index 77a287e293443a9a92c755880de00e8a766940c7..304abe890d7b84b1205a050b34cabf65e0aacc04 100644
--- a/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc
+++ b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc
@@ -44,7 +44,8 @@ void MultiResolutionImageResourceFetcher::OnURLFetchComplete(
std::vector<SkBitmap> bitmaps;
if (!response.isNull()) {
http_status_code_ = response.httpStatusCode();
- if (http_status_code_ == 200) {
+ GURL url(response.url());
+ if (http_status_code_ == 200 || url.SchemeIsFile()) {
jamesr 2013/07/13 01:40:07 why the extra temp variable?
// Request succeeded, try to convert it to an image.
bitmaps = ImageDecoder::DecodeAll(
reinterpret_cast<const unsigned char*>(data.data()), data.size());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698