From fce8d19805ad83a006bbdd3ca68fc9d8eca621e6 Mon Sep 17 00:00:00 2001 From: brettw Date: Mon, 10 Aug 2015 12:07:51 -0700 Subject: 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} --- components/crx_file/crx_file.cc | 2 +- components/crx_file/id_util.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'components/crx_file') diff --git a/components/crx_file/crx_file.cc b/components/crx_file/crx_file.cc index b081fec..ace6ee1 100644 --- a/components/crx_file/crx_file.cc +++ b/components/crx_file/crx_file.cc @@ -61,7 +61,7 @@ CrxFile::ValidateError FinalizeHash(const std::string& extension_id, uint8 output[crypto::kSHA256Length] = {}; hash->Finish(output, sizeof(output)); std::string hash_base64 = - base::StringToLowerASCII(base::HexEncode(output, sizeof(output))); + base::ToLowerASCII(base::HexEncode(output, sizeof(output))); if (hash_base64 != expected_hash) { LOG(ERROR) << "Hash check failed for extension: " << extension_id << ", expected " << expected_hash << ", got " << hash_base64; diff --git a/components/crx_file/id_util.cc b/components/crx_file/id_util.cc index 6209cb4..d628aa1 100644 --- a/components/crx_file/id_util.cc +++ b/components/crx_file/id_util.cc @@ -40,7 +40,7 @@ std::string GenerateId(const std::string& input) { uint8 hash[kIdSize]; crypto::SHA256HashString(input, hash, sizeof(hash)); std::string output = - base::StringToLowerASCII(base::HexEncode(hash, sizeof(hash))); + base::ToLowerASCII(base::HexEncode(hash, sizeof(hash))); ConvertHexadecimalToIDAlphabet(&output); return output; @@ -83,7 +83,7 @@ bool IdIsValid(const std::string& id) { // We only support lowercase IDs, because IDs can be used as URL components // (where GURL will lowercase it). - std::string temp = base::StringToLowerASCII(id); + std::string temp = base::ToLowerASCII(id); for (size_t i = 0; i < temp.size(); i++) if (temp[i] < 'a' || temp[i] > 'p') return false; -- cgit v1.1