summaryrefslogtreecommitdiffstats
path: root/chrome/test/chromedriver
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 /chrome/test/chromedriver
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 'chrome/test/chromedriver')
-rw-r--r--chrome/test/chromedriver/capabilities.cc2
-rw-r--r--chrome/test/chromedriver/chrome_launcher.cc3
-rw-r--r--chrome/test/chromedriver/server/http_handler.cc14
3 files changed, 9 insertions, 10 deletions
diff --git a/chrome/test/chromedriver/capabilities.cc b/chrome/test/chromedriver/capabilities.cc
index bc5bbbb..e4ba863 100644
--- a/chrome/test/chromedriver/capabilities.cc
+++ b/chrome/test/chromedriver/capabilities.cc
@@ -211,7 +211,7 @@ Status ParseProxy(const base::Value& option, Capabilities* capabilities) {
std::string proxy_type;
if (!proxy_dict->GetString("proxyType", &proxy_type))
return Status(kUnknownError, "'proxyType' must be a string");
- proxy_type = base::StringToLowerASCII(proxy_type);
+ proxy_type = base::ToLowerASCII(proxy_type);
if (proxy_type == "direct") {
capabilities->switches.SetSwitch("no-proxy-server");
} else if (proxy_type == "system") {
diff --git a/chrome/test/chromedriver/chrome_launcher.cc b/chrome/test/chromedriver/chrome_launcher.cc
index cb77dc1..90ddede 100644
--- a/chrome/test/chromedriver/chrome_launcher.cc
+++ b/chrome/test/chromedriver/chrome_launcher.cc
@@ -573,8 +573,7 @@ void ConvertHexadecimalToIDAlphabet(std::string* id) {
std::string GenerateExtensionId(const std::string& input) {
uint8 hash[16];
crypto::SHA256HashString(input, hash, sizeof(hash));
- std::string output =
- base::StringToLowerASCII(base::HexEncode(hash, sizeof(hash)));
+ std::string output = base::ToLowerASCII(base::HexEncode(hash, sizeof(hash)));
ConvertHexadecimalToIDAlphabet(&output);
return output;
}
diff --git a/chrome/test/chromedriver/server/http_handler.cc b/chrome/test/chromedriver/server/http_handler.cc
index 63c0a95..c3941b0 100644
--- a/chrome/test/chromedriver/server/http_handler.cc
+++ b/chrome/test/chromedriver/server/http_handler.cc
@@ -722,14 +722,14 @@ namespace internal {
const char kNewSessionPathPattern[] = "session";
bool MatchesMethod(HttpMethod command_method, const std::string& method) {
- std::string lower_method = base::StringToLowerASCII(method);
+ std::string lower_method = base::ToLowerASCII(method);
switch (command_method) {
- case kGet:
- return lower_method == "get";
- case kPost:
- return lower_method == "post" || lower_method == "put";
- case kDelete:
- return lower_method == "delete";
+ case kGet:
+ return lower_method == "get";
+ case kPost:
+ return lower_method == "post" || lower_method == "put";
+ case kDelete:
+ return lower_method == "delete";
}
return false;
}