diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-23 00:25:01 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-23 00:25:01 +0000 |
commit | 498d7d1f63ebb3585d3d2273e2925c6ef852d6d3 (patch) | |
tree | b4b38dafe832d65d83904cb9b969883717a9b358 /views/drag_utils.cc | |
parent | f4b0e873a3515ad6fb48667275797be9f49209a1 (diff) | |
download | chromium_src-498d7d1f63ebb3585d3d2273e2925c6ef852d6d3.zip chromium_src-498d7d1f63ebb3585d3d2273e2925c6ef852d6d3.tar.gz chromium_src-498d7d1f63ebb3585d3d2273e2925c6ef852d6d3.tar.bz2 |
Use FilePath::BaseName instead of the deprecated file_util::GetFilenameFromPath.
BUG=24672
TEST=trybots
Review URL: http://codereview.chromium.org/6070008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/drag_utils.cc')
-rw-r--r-- | views/drag_utils.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/views/drag_utils.cc b/views/drag_utils.cc index 0579ba5..8c00edf 100644 --- a/views/drag_utils.cc +++ b/views/drag_utils.cc @@ -53,7 +53,7 @@ void SetURLAndDragImage(const GURL& url, gfx::Point(prefsize.width() / 2, prefsize.height() / 2), data); } -void CreateDragImageForFile(const FilePath::StringType& file_name, +void CreateDragImageForFile(const FilePath& file_name, SkBitmap* icon, OSExchangeData* data_object) { DCHECK(icon); @@ -72,15 +72,14 @@ void CreateDragImageForFile(const FilePath::StringType& file_name, // Paint the icon. canvas.DrawBitmapInt(*icon, (width - icon->width()) / 2, 0); + std::wstring name = file_name.BaseName().ToWStringHack(); #if defined(OS_WIN) // Paint the file name. We inset it one pixel to allow room for the halo. - std::wstring name = file_util::GetFilenameFromPath(file_name); canvas.DrawStringWithHalo(name, font, kFileDragImageTextColor, SK_ColorWHITE, 1, icon->height() + kLinkDragImageVPadding + 1, width - 2, font.GetHeight(), gfx::Canvas::TEXT_ALIGN_CENTER); #else - std::wstring name = FilePath(file_name).BaseName().ToWStringHack(); canvas.DrawStringInt(name, font, kFileDragImageTextColor, 0, icon->height() + kLinkDragImageVPadding, width, font.GetHeight(), gfx::Canvas::TEXT_ALIGN_CENTER); |