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

Unified Diff: views/drag_utils.cc

Issue 2861042: Deprecate more old filepath functions. (Closed)
Patch Set: Created 10 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 | « chrome/browser/tab_contents/navigation_controller.cc ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/drag_utils.cc
diff --git a/views/drag_utils.cc b/views/drag_utils.cc
index 07e935935d671d3cfefa7f8162bbf451612f76f6..aff790ad8300d526a03160aa7c93470d66d8b1be 100644
--- a/views/drag_utils.cc
+++ b/views/drag_utils.cc
@@ -81,7 +81,7 @@ void CreateDragImageForFile(const FilePath::StringType& file_name,
width - 2, font.height(),
gfx::Canvas::TEXT_ALIGN_CENTER);
#else
- std::wstring name = file_util::GetFilenameFromPath(UTF8ToWide(file_name));
+ std::wstring name = FilePath(file_name).BaseName().ToWStringHack();
canvas.DrawStringInt(name, font, kFileDragImageTextColor,
0, icon->height() + kLinkDragImageVPadding,
width, font.height(), gfx::Canvas::TEXT_ALIGN_CENTER);
« no previous file with comments | « chrome/browser/tab_contents/navigation_controller.cc ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698