summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-16 19:57:22 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-16 19:57:22 +0000
commit09c6dec4e18784861660f716d038035be9540601 (patch)
treeb5e5419aff269cb15c13ea6a3eab0c90a527ef4a /chrome/browser/dom_ui
parent66980a010042f2e44efb21360e662daeae8c5668 (diff)
downloadchromium_src-09c6dec4e18784861660f716d038035be9540601.zip
chromium_src-09c6dec4e18784861660f716d038035be9540601.tar.gz
chromium_src-09c6dec4e18784861660f716d038035be9540601.tar.bz2
Add file icons to chrome://downloads/ on the Mac. Add Skia helper
CGImageToSkBitmap(). Patch by Robert Sesek <rsesek@bluestatic.org> Review URL: http://codereview.chromium.org/118488 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18517 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/fileicon_source.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/dom_ui/fileicon_source.cc b/chrome/browser/dom_ui/fileicon_source.cc
index e35d49c..daf9a43 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.