Index: base/command_line.cc |
diff --git a/base/command_line.cc b/base/command_line.cc |
index 6125667d3ec8e66dcead5ec8147fd5879bd6ad48..f6c435391587f10e075df02a2b486e4cf86c01a5 100644 |
--- a/base/command_line.cc |
+++ b/base/command_line.cc |
@@ -93,14 +93,14 @@ void AppendSwitchesAndArguments(CommandLine* command_line, |
} |
} |
-// Lowercase switches for backwards compatiblity *on Windows*. |
+// Lowercase switches for backwards compatibility *on Windows*. |
#if defined(OS_WIN) |
-std::string LowerASCIIOnWindows(const std::string& string) { |
- return StringToLowerASCII(string); |
+std::string LowerASCIIOnWindows(const base::StringPiece& string) { |
+ return StringToLowerASCII(string.as_string()); |
} |
#elif defined(OS_POSIX) |
-const std::string& LowerASCIIOnWindows(const std::string& string) { |
- return string; |
+std::string LowerASCIIOnWindows(const base::StringPiece& string) { |
+ return string.as_string(); |
} |
#endif |
@@ -262,7 +262,7 @@ void CommandLine::SetProgram(const FilePath& program) { |
TrimWhitespace(program.value(), TRIM_ALL, &argv_[0]); |
} |
-bool CommandLine::HasSwitch(const std::string& switch_string) const { |
+bool CommandLine::HasSwitch(const base::StringPiece& switch_string) const { |
return switches_.find(LowerASCIIOnWindows(switch_string)) != switches_.end(); |
} |