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

Unified Diff: chrome/browser/platform_util_win.cc

Issue 13196006: Move path functions from file_util to FilePath object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move AsAbsolute back out of FilePath Created 7 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
Index: chrome/browser/platform_util_win.cc
diff --git a/chrome/browser/platform_util_win.cc b/chrome/browser/platform_util_win.cc
index 4290009d75dc225c468f7a4534d9222d8f2bdac9..f0f6f07db2fc04b7f5c33ab17b2baab81fac3ec0 100644
--- a/chrome/browser/platform_util_win.cc
+++ b/chrome/browser/platform_util_win.cc
@@ -31,9 +31,9 @@ namespace {
void ShowItemInFolderOnFileThread(const base::FilePath& full_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- base::FilePath dir = full_path.DirName();
+ base::FilePath dir = full_path.DirName().AsEndingWithSeparator();
// ParseDisplayName will fail if the directory is "C:", it must be "C:\\".
- if (dir.value() == L"" || !file_util::EnsureEndsWithSeparator(&dir))
+ if (dir.empty())
rvargas (doing something else) 2013/04/02 01:39:56 The old code rejected empty paths while the new ve
brettw 2013/04/08 23:40:20 Good catch, I also added tests for this case.
return;
typedef HRESULT (WINAPI *SHOpenFolderAndSelectItemsFuncPtr)(

Powered by Google App Engine
This is Rietveld 408576698