summaryrefslogtreecommitdiffstats
path: root/google_apis
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-08-11 12:30:22 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-11 19:31:27 +0000
commit8e2106dd88a61950569f9cfa8a94ad436d858658 (patch)
treeb95818b8b8d98565bc0beaae50ffb76fa3d82080 /google_apis
parent7d42dad6d95bf258c721f9d15f734bb9d0af8014 (diff)
downloadchromium_src-8e2106dd88a61950569f9cfa8a94ad436d858658.zip
chromium_src-8e2106dd88a61950569f9cfa8a94ad436d858658.tar.gz
chromium_src-8e2106dd88a61950569f9cfa8a94ad436d858658.tar.bz2
Convert remaining StringToLowerASCII to ToLowerASCII.
Remove StringToLowerASCII. This removes the template and makes a consistent call that can take a string piece. http_response_headers.cc in HttpResponseHeaders::RemoveHeaderLine there seemed to be a bug where it did std::string old_header_name_lowercase(name); where it actually meant std::string old_header_name_lowercase(old_header_name); I fixed this. There were a number of cases where url.host() or url.scheme() was passed to ToLowerASCII. These are already guaranteed lower-case, so I removed the call. There were a number of cases in net that did return ToLowerASCII().c_str() when the return type is a std::string, which is unnecessary and wasteful. I removed the c_str() call. NOPRESUBMIT=true (for touching code with wstrings) Review URL: https://codereview.chromium.org/1282363003 Cr-Commit-Position: refs/heads/master@{#342869}
Diffstat (limited to 'google_apis')
-rw-r--r--google_apis/gaia/gaia_auth_util.cc5
-rw-r--r--google_apis/gcm/engine/gservices_settings.cc2
2 files changed, 3 insertions, 4 deletions
diff --git a/google_apis/gaia/gaia_auth_util.cc b/google_apis/gaia/gaia_auth_util.cc
index cc5e17c..caf802f 100644
--- a/google_apis/gaia/gaia_auth_util.cc
+++ b/google_apis/gaia/gaia_auth_util.cc
@@ -35,8 +35,7 @@ std::string CanonicalizeEmailImpl(const std::string& email_address,
base::RemoveChars(parts[0], ".", &parts[0]);
}
- std::string new_email = base::StringToLowerASCII(
- base::JoinString(parts, "@"));
+ std::string new_email = base::ToLowerASCII(base::JoinString(parts, "@"));
VLOG(1) << "Canonicalized " << email_address << " to " << new_email;
return new_email;
}
@@ -72,7 +71,7 @@ std::string CanonicalizeEmail(const std::string& email_address) {
std::string CanonicalizeDomain(const std::string& domain) {
// Canonicalization of domain names means lower-casing them. Make sure to
// update this function in sync with Canonicalize if this ever changes.
- return base::StringToLowerASCII(domain);
+ return base::ToLowerASCII(domain);
}
std::string SanitizeEmail(const std::string& email_address) {
diff --git a/google_apis/gcm/engine/gservices_settings.cc b/google_apis/gcm/engine/gservices_settings.cc
index c50f3e8..6621ff8 100644
--- a/google_apis/gcm/engine/gservices_settings.cc
+++ b/google_apis/gcm/engine/gservices_settings.cc
@@ -198,7 +198,7 @@ std::string GServicesSettings::CalculateDigest(const SettingsMap& settings) {
reinterpret_cast<const unsigned char*>(&data[0]), data.size(), hash);
std::string digest =
kDigestVersionPrefix + base::HexEncode(hash, base::kSHA1Length);
- digest = base::StringToLowerASCII(digest);
+ digest = base::ToLowerASCII(digest);
return digest;
}