diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 02:12:15 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 02:12:15 +0000 |
commit | 15e093c9972a9ab2c7dedf23e8a8766fdfc3a41d (patch) | |
tree | 17e461be1e026df050079159ca803c57d656c0cd /base/file_util_win.cc | |
parent | 7e6fa7c3f4c3db8f8fe9f1eec8b0a48432e8f6bb (diff) | |
download | chromium_src-15e093c9972a9ab2c7dedf23e8a8766fdfc3a41d.zip chromium_src-15e093c9972a9ab2c7dedf23e8a8766fdfc3a41d.tar.gz chromium_src-15e093c9972a9ab2c7dedf23e8a8766fdfc3a41d.tar.bz2 |
Use FilePath::DirName instead of the deprecated file_util::GetDirectoryFromPath.
Fix the callers and remove the deprecated function.
BUG=24672
TEST=trybots
Review URL: http://codereview.chromium.org/6111003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_win.cc')
-rw-r--r-- | base/file_util_win.cc | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc index 9ab96c0..7476b53 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]; |