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

Unified Diff: base/file_util_win.cc

Issue 271086: Remove file_util::TrimTrailingSeparators(), which is deprecated and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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/test/mini_installer_test/chrome_mini_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_win.cc
===================================================================
--- base/file_util_win.cc (revision 28937)
+++ base/file_util_win.cc (working copy)
@@ -28,8 +28,7 @@
std::wstring::size_type length =
file_ptr ? file_ptr - path_buffer : path.length();
std::wstring directory(path, 0, length);
- TrimTrailingSeparator(&directory);
- return directory;
+ return FilePath(directory).StripTrailingSeparators().value();
}
bool AbsolutePath(FilePath* path) {
@@ -648,8 +647,7 @@
// 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;
}
« no previous file with comments | « base/file_util_unittest.cc ('k') | chrome/test/mini_installer_test/chrome_mini_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698