diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 22:59:05 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 22:59:05 +0000 |
commit | 33eb5ad09b9cc9fe9f1fb95c4ba41ace5c3b6bc8 (patch) | |
tree | 8529954cf39744ce032cbb11013167da1cd3798b /base/file_util_win.cc | |
parent | ba6332442ae92c544eb6629c8604c608d6aeb5cd (diff) | |
download | chromium_src-33eb5ad09b9cc9fe9f1fb95c4ba41ace5c3b6bc8.zip chromium_src-33eb5ad09b9cc9fe9f1fb95c4ba41ace5c3b6bc8.tar.gz chromium_src-33eb5ad09b9cc9fe9f1fb95c4ba41ace5c3b6bc8.tar.bz2 |
Stop using and remove deprecated file_util::TrimTrailingSeparator().
Review URL: http://codereview.chromium.org/67271
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_win.cc')
-rw-r--r-- | base/file_util_win.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc index 8b3d4f5..8020dca 100644 --- a/base/file_util_win.cc +++ b/base/file_util_win.cc @@ -28,8 +28,8 @@ std::wstring GetDirectoryFromPath(const std::wstring& path) { std::wstring::size_type length = file_ptr ? file_ptr - path_buffer : path.length(); std::wstring directory(path, 0, length); - TrimTrailingSeparator(&directory); - return directory; + FilePath fp_directory(directory); + return fp_directory.StripTrailingSeparators().value(); } bool AbsolutePath(FilePath* path) { @@ -423,8 +423,7 @@ bool GetTempDir(FilePath* path) { // trailing slash. We duplicate this here, but it shouldn't be necessary // when everyone is using the appropriate FilePath APIs. std::wstring path_str(temp_path); - TrimTrailingSeparator(&path_str); - *path = FilePath(path_str); + *path = FilePath(path_str).StripTrailingSeparators(); return true; } @@ -638,8 +637,7 @@ bool GetCurrentDirectory(FilePath* dir) { // trailing slash. We duplicate this here, but it shouldn't be necessary // when everyone is using the appropriate FilePath APIs. std::wstring dir_str(system_buffer); - file_util::TrimTrailingSeparator(&dir_str); - *dir = FilePath(dir_str); + *dir = FilePath(dir_str).StripTrailingSeparators(); return true; } |