summaryrefslogtreecommitdiffstats
path: root/base/command_line.cc
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-08-10 12:07:51 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-10 19:08:31 +0000
commitfce8d19805ad83a006bbdd3ca68fc9d8eca621e6 (patch)
tree53b8fca581ffa89718788efe7a4295a662554d03 /base/command_line.cc
parenta794ba10af6e3ac6d4661a2edc6f8d60642218af (diff)
downloadchromium_src-fce8d19805ad83a006bbdd3ca68fc9d8eca621e6.zip
chromium_src-fce8d19805ad83a006bbdd3ca68fc9d8eca621e6.tar.gz
chromium_src-fce8d19805ad83a006bbdd3ca68fc9d8eca621e6.tar.bz2
Replace ToLower calls to the new format
Replaces base::StringToLowerASCII(string) with base::ToLowerASCII(string) This form is 1:1 search and replace. A bunch of places did something like this: std::string foo(something_else); base::StringToLowerASCII(&foo); which became: foo = base::ToLowerASCII(something_else); A couple places really wanted in-place changing and they became: foo = base::ToLowerASCII(foo); There was pretty trivial cleanup in chrome_main_delegate.cc chrome/test/chromedriver/server/http_handler.cc (fix indenting). There was more cleanup in: chrome/installer/util/language_selector.cc and components/plugins/renderer/mobile_youtube_plugin.cc In components/history/core/browser/url_utils.cc I removed the call since it was calling ToLower on the host name out of a GURL, which is already guaranteed to be lower-case. NOPRESUBMIT=true (due to touching code with wstrings) Review URL: https://codereview.chromium.org/1279123004 Cr-Commit-Position: refs/heads/master@{#342659}
Diffstat (limited to 'base/command_line.cc')
-rw-r--r--base/command_line.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/command_line.cc b/base/command_line.cc
index 95ff644..c2ce33d 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -267,7 +267,7 @@ void CommandLine::SetProgram(const FilePath& program) {
}
bool CommandLine::HasSwitch(const base::StringPiece& switch_string) const {
- DCHECK_EQ(StringToLowerASCII(switch_string.as_string()), switch_string);
+ DCHECK_EQ(ToLowerASCII(switch_string), switch_string);
return switches_by_stringpiece_.find(switch_string) !=
switches_by_stringpiece_.end();
}
@@ -297,7 +297,7 @@ FilePath CommandLine::GetSwitchValuePath(
CommandLine::StringType CommandLine::GetSwitchValueNative(
const base::StringPiece& switch_string) const {
- DCHECK_EQ(StringToLowerASCII(switch_string.as_string()), switch_string);
+ DCHECK_EQ(ToLowerASCII(switch_string), switch_string);
auto result = switches_by_stringpiece_.find(switch_string);
return result == switches_by_stringpiece_.end() ? StringType()
: *(result->second);
@@ -315,7 +315,7 @@ void CommandLine::AppendSwitchPath(const std::string& switch_string,
void CommandLine::AppendSwitchNative(const std::string& switch_string,
const CommandLine::StringType& value) {
#if defined(OS_WIN)
- const std::string switch_key = StringToLowerASCII(switch_string);
+ const std::string switch_key = ToLowerASCII(switch_string);
StringType combined_switch_string(ASCIIToUTF16(switch_key));
#elif defined(OS_POSIX)
const std::string& switch_key = switch_string;