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

Unified Diff: base/command_line.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 | « no previous file | base/strings/string_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/command_line.cc
diff --git a/base/command_line.cc b/base/command_line.cc
index c2ce33db5d20801c525603fab0b91a5b93717ba2..e2dde1cdf83b5594ef0fa97253a98aec85a2c3bd 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -75,7 +75,11 @@ void AppendSwitchesAndArguments(CommandLine* command_line,
bool parse_switches = true;
for (size_t i = 1; i < argv.size(); ++i) {
CommandLine::StringType arg = argv[i];
+#if defined(OS_WIN)
TrimWhitespace(arg, TRIM_ALL, &arg);
+#else
+ TrimWhitespaceASCII(arg, TRIM_ALL, &arg);
+#endif
CommandLine::StringType switch_string;
CommandLine::StringType switch_value;
@@ -263,7 +267,11 @@ FilePath CommandLine::GetProgram() const {
}
void CommandLine::SetProgram(const FilePath& program) {
+#if defined(OS_WIN)
TrimWhitespace(program.value(), TRIM_ALL, &argv_[0]);
+#else
+ TrimWhitespaceASCII(program.value(), TRIM_ALL, &argv_[0]);
+#endif
}
bool CommandLine::HasSwitch(const base::StringPiece& switch_string) const {
« no previous file with comments | « no previous file | base/strings/string_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698