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

Unified Diff: chrome/browser/dom_ui/fileicon_source.cc

Issue 118488: Add file icons to chrome://downloads/ on the Mac. Add Skia helper CGImageToSkBitmap(). (Closed)
Patch Set: Switch to using |-drawInRect:| rather than |-drawAtPoint:| Created 11 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 | chrome/browser/icon_loader_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/fileicon_source.cc
diff --git a/chrome/browser/dom_ui/fileicon_source.cc b/chrome/browser/dom_ui/fileicon_source.cc
index e35d49c3638a5d5b968435c33b5269a226e96a49..daf9a434de624471ccb2dc5e12e68320f7443fc3 100644
--- a/chrome/browser/dom_ui/fileicon_source.cc
+++ b/chrome/browser/dom_ui/fileicon_source.cc
@@ -25,13 +25,12 @@ void FileIconSource::StartDataRequest(const std::string& path,
int request_id) {
IconManager* im = g_browser_process->icon_manager();
- // The path we receive has the wrong slashes and escaping for what we need;
- // this only appears to matter for getting icons from .exe files.
std::string escaped_path = UnescapeURLComponent(path, UnescapeRule::SPACES);
- std::replace(escaped_path.begin(), escaped_path.end(), '/', '\\');
- // Fast look up.
#if defined(OS_WIN)
+ // The path we receive has the wrong slashes and escaping for what we need;
+ // this only appears to matter for getting icons from .exe files.
+ std::replace(escaped_path.begin(), escaped_path.end(), '/', '\\');
FilePath escaped_filepath(UTF8ToWide(escaped_path));
#elif defined(OS_POSIX)
// The correct encoding on Linux may not actually be UTF8.
« no previous file with comments | « no previous file | chrome/browser/icon_loader_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698