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

Unified Diff: base/file_util_win.cc

Issue 6111003: Use FilePath::DirName instead of the deprecated file_util::GetDirectoryFromPath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review2 Created 9 years, 11 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 | « base/file_util_unittest.cc ('k') | chrome/browser/ui/views/shell_dialogs_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_win.cc
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index 9ab96c09a5f7c1bfaac9654ebd139b3c02091382..7476b53765b984e05e1e0a252d7e9e968dddc5a1 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -77,19 +77,6 @@ bool DevicePathToDriveLetterPath(const FilePath& device_path,
} // namespace
-std::wstring GetDirectoryFromPath(const std::wstring& path) {
- base::ThreadRestrictions::AssertIOAllowed();
- wchar_t path_buffer[MAX_PATH];
- wchar_t* file_ptr = NULL;
- if (GetFullPathName(path.c_str(), MAX_PATH, path_buffer, &file_ptr) == 0)
- return L"";
-
- std::wstring::size_type length =
- file_ptr ? file_ptr - path_buffer : path.length();
- std::wstring directory(path, 0, length);
- return FilePath(directory).StripTrailingSeparators().value();
-}
-
bool AbsolutePath(FilePath* path) {
base::ThreadRestrictions::AssertIOAllowed();
wchar_t file_path_buf[MAX_PATH];
« no previous file with comments | « base/file_util_unittest.cc ('k') | chrome/browser/ui/views/shell_dialogs_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698