diff options
author | brettw <brettw@chromium.org> | 2015-08-11 12:30:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-11 19:31:27 +0000 |
commit | 8e2106dd88a61950569f9cfa8a94ad436d858658 (patch) | |
tree | b95818b8b8d98565bc0beaae50ffb76fa3d82080 /extensions/common/permissions | |
parent | 7d42dad6d95bf258c721f9d15f734bb9d0af8014 (diff) | |
download | chromium_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 'extensions/common/permissions')
-rw-r--r-- | extensions/common/permissions/socket_permission_entry.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/common/permissions/socket_permission_entry.cc b/extensions/common/permissions/socket_permission_entry.cc index 86c61de..012eda0 100644 --- a/extensions/common/permissions/socket_permission_entry.cc +++ b/extensions/common/permissions/socket_permission_entry.cc @@ -75,7 +75,7 @@ bool SocketPermissionEntry::Check( if (pattern_.type != request.type) return false; - std::string lhost = base::StringToLowerASCII(request.host); + std::string lhost = base::ToLowerASCII(request.host); if (pattern_.host != lhost) { if (!match_subdomains_) return false; @@ -166,7 +166,7 @@ bool SocketPermissionEntry::ParseHostPattern( if (!result.pattern_.host.empty()) { if (StartsOrEndsWithWhitespace(result.pattern_.host)) return false; - result.pattern_.host = base::StringToLowerASCII(result.pattern_.host); + result.pattern_.host = base::ToLowerASCII(result.pattern_.host); // The first component can optionally be '*' to match all subdomains. std::vector<std::string> host_components = |