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

Unified Diff: chrome/browser/search/local_ntp_source.cc

Issue 1000773002: Fixes sending the wrong mime-type for scaled resources (.png@2x) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: chrome/browser/search/local_ntp_source.cc
diff --git a/chrome/browser/search/local_ntp_source.cc b/chrome/browser/search/local_ntp_source.cc
index b4b4d7db944f5f21fe759cdeb8f350148e2e2164..c25e6ec67b08192e4ffe4a074862bdce6e5d296c 100644
--- a/chrome/browser/search/local_ntp_source.cc
+++ b/chrome/browser/search/local_ntp_source.cc
@@ -184,9 +184,12 @@ void LocalNtpSource::StartDataRequest(
std::string LocalNtpSource::GetMimeType(
const std::string& path) const {
- const std::string stripped_path = StripParameters(path);
+ const std::string& stripped_path = StripParameters(path);
+ std::string filename;
+ webui::ParsePathAndScale(GURL(GetLocalNtpPath() + stripped_path), &filename,
+ NULL);
for (size_t i = 0; i < arraysize(kResources); ++i) {
- if (stripped_path == kResources[i].filename)
+ if (filename == kResources[i].filename)
return kResources[i].mime_type;
}
return std::string();
« 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