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

Unified Diff: net/http/bidirectional_stream.cc

Issue 2904643002: Remove some naked |new| statements in favor of MakeUnique. (Closed)
Patch Set: Re: #11. Created 3 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 | « no previous file | net/http/http_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/bidirectional_stream.cc
diff --git a/net/http/bidirectional_stream.cc b/net/http/bidirectional_stream.cc
index c984b53eb1581704ee9eb63abb020e72fd4bb5ba..f76dee08a41d0978d4e35aba0c6df4b861944a38 100644
--- a/net/http/bidirectional_stream.cc
+++ b/net/http/bidirectional_stream.cc
@@ -39,7 +39,7 @@ namespace {
std::unique_ptr<base::Value> NetLogHeadersCallback(
const SpdyHeaderBlock* headers,
NetLogCaptureMode capture_mode) {
- std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+ auto dict = base::MakeUnique<base::DictionaryValue>();
dict->Set("headers", ElideSpdyHeaderBlockForNetLog(*headers, capture_mode));
return std::move(dict);
}
@@ -48,7 +48,7 @@ std::unique_ptr<base::Value> NetLogCallback(const GURL* url,
const std::string* method,
const HttpRequestHeaders* headers,
NetLogCaptureMode capture_mode) {
- std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+ auto dict = base::MakeUnique<base::DictionaryValue>();
dict->SetString("url", url->possibly_invalid_spec());
dict->SetString("method", *method);
std::string empty;
« no previous file with comments | « no previous file | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698