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

Unified Diff: net/http/http_response_headers.cc

Issue 2037933002: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_request_headers.cc ('k') | net/http/http_server_properties_impl.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 9574b03bc851209f6d53797d7019690fcfd8d76b..f44e279d29bfa820f54af82dd9affbe012c2542d 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -1416,7 +1416,7 @@ std::unique_ptr<base::Value> HttpResponseHeaders::NetLogCallback(
NetLogCaptureMode capture_mode) const {
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
base::ListValue* headers = new base::ListValue();
- headers->Append(new base::StringValue(EscapeNonASCII(GetStatusLine())));
+ headers->AppendString(EscapeNonASCII(GetStatusLine()));
size_t iterator = 0;
std::string name;
std::string value;
@@ -1425,10 +1425,8 @@ std::unique_ptr<base::Value> HttpResponseHeaders::NetLogCallback(
ElideHeaderValueForNetLog(capture_mode, name, value);
std::string escaped_name = EscapeNonASCII(name);
std::string escaped_value = EscapeNonASCII(log_value);
- headers->Append(
- new base::StringValue(
- base::StringPrintf("%s: %s", escaped_name.c_str(),
- escaped_value.c_str())));
+ headers->AppendString(base::StringPrintf("%s: %s", escaped_name.c_str(),
+ escaped_value.c_str()));
}
dict->Set("headers", headers);
return std::move(dict);
« no previous file with comments | « net/http/http_request_headers.cc ('k') | net/http/http_server_properties_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698