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

Unified Diff: net/base/filename_util_internal.cc

Issue 1493503002: base: get rid of deprecated TrimWhitespace() function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years 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 | « content/renderer/npapi/webplugin_impl_unittest.cc ('k') | net/test/python_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/filename_util_internal.cc
diff --git a/net/base/filename_util_internal.cc b/net/base/filename_util_internal.cc
index 57183dcd1ada079329841086cd4bc40200f02540..4cfedcd865c8f2850cc234b04850efd78f906e7a 100644
--- a/net/base/filename_util_internal.cc
+++ b/net/base/filename_util_internal.cc
@@ -31,7 +31,12 @@ void SanitizeGeneratedFileName(base::FilePath::StringType* filename,
size_t length = filename->size();
size_t pos = filename->find_last_not_of(FILE_PATH_LITERAL(" ."));
filename->resize((pos == std::string::npos) ? 0 : (pos + 1));
+#if defined(OS_WIN)
base::TrimWhitespace(*filename, base::TRIM_TRAILING, filename);
+#else
+ base::TrimWhitespaceASCII(*filename, base::TRIM_TRAILING, filename);
+#endif
+
if (filename->empty())
return;
size_t trimmed = length - filename->size();
« no previous file with comments | « content/renderer/npapi/webplugin_impl_unittest.cc ('k') | net/test/python_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698