Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: net/http/http_response_headers.cc

Issue 448853002: Move StringToLowerASCII to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_log_util.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_headers.cc
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index e767ebb4fcd2900cb976b77a00ee828b3c4fd4b7..698366968b16fd13cda3b7350d377de5dc806e99 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -208,7 +208,7 @@ void HttpResponseHeaders::Persist(Pickle* pickle, PersistOptions options) {
--k;
std::string header_name(parsed_[i].name_begin, parsed_[i].name_end);
- StringToLowerASCII(&header_name);
+ base::StringToLowerASCII(&header_name);
if (filter_headers.find(header_name) == filter_headers.end()) {
// Make sure there is a null after the value.
@@ -251,7 +251,7 @@ void HttpResponseHeaders::Update(const HttpResponseHeaders& new_headers) {
const std::string::const_iterator& name_end = new_parsed[i].name_end;
if (ShouldUpdateHeader(name_begin, name_end)) {
std::string name(name_begin, name_end);
- StringToLowerASCII(&name);
+ base::StringToLowerASCII(&name);
updated_headers.insert(name);
// Preserve this header line in the merged result, making sure there is
@@ -279,7 +279,7 @@ void HttpResponseHeaders::MergeWithHeaders(const std::string& raw_headers,
--k;
std::string name(parsed_[i].name_begin, parsed_[i].name_end);
- StringToLowerASCII(&name);
+ base::StringToLowerASCII(&name);
if (headers_to_remove.find(name) == headers_to_remove.end()) {
// It's ok to preserve this header in the final result.
new_raw_headers.append(parsed_[i].name_begin, parsed_[k].value_end);
@@ -302,7 +302,7 @@ void HttpResponseHeaders::RemoveHeader(const std::string& name) {
new_raw_headers.push_back('\0');
std::string lowercase_name(name);
- StringToLowerASCII(&lowercase_name);
+ base::StringToLowerASCII(&lowercase_name);
HeaderSet to_remove;
to_remove.insert(lowercase_name);
MergeWithHeaders(new_raw_headers, to_remove);
@@ -311,7 +311,7 @@ void HttpResponseHeaders::RemoveHeader(const std::string& name) {
void HttpResponseHeaders::RemoveHeaderLine(const std::string& name,
const std::string& value) {
std::string name_lowercase(name);
- StringToLowerASCII(&name_lowercase);
+ base::StringToLowerASCII(&name_lowercase);
std::string new_raw_headers(GetStatusLine());
new_raw_headers.push_back('\0');
@@ -323,7 +323,7 @@ void HttpResponseHeaders::RemoveHeaderLine(const std::string& name,
std::string old_header_value;
while (EnumerateHeaderLines(&iter, &old_header_name, &old_header_value)) {
std::string old_header_name_lowercase(name);
- StringToLowerASCII(&old_header_name_lowercase);
+ base::StringToLowerASCII(&old_header_name_lowercase);
if (name_lowercase == old_header_name_lowercase &&
value == old_header_value)
@@ -474,7 +474,7 @@ void HttpResponseHeaders::GetNormalizedHeaders(std::string* output) const {
DCHECK(!parsed_[i].is_continuation());
std::string name(parsed_[i].name_begin, parsed_[i].name_end);
- std::string lower_name = StringToLowerASCII(name);
+ std::string lower_name = base::StringToLowerASCII(name);
iter = headers_map.find(lower_name);
if (iter == headers_map.end()) {
@@ -850,7 +850,7 @@ void HttpResponseHeaders::AddNonCacheableHeaders(HeaderSet* result) const {
// assuming the header is not empty, lowercase and insert into set
if (item_end > item) {
std::string name(&*item, item_end - item);
- StringToLowerASCII(&name);
+ base::StringToLowerASCII(&name);
result->insert(name);
}
« no previous file with comments | « net/http/http_log_util.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698