Index: net/spdy/core/spdy_header_block.cc |
diff --git a/net/spdy/core/spdy_header_block.cc b/net/spdy/core/spdy_header_block.cc |
index 8475b2e7a7e545031fa3860bab3da3215f340549..72e0b36a2fed6e9d3bcd10ad6db4a1c50fa757b4 100644 |
--- a/net/spdy/core/spdy_header_block.cc |
+++ b/net/spdy/core/spdy_header_block.cc |
@@ -11,6 +11,7 @@ |
#include "base/logging.h" |
#include "base/macros.h" |
+#include "base/memory/ptr_util.h" |
#include "base/values.h" |
#include "net/base/arena.h" |
#include "net/http/http_log_util.h" |
@@ -330,16 +331,16 @@ SpdyHeaderBlock::Storage* SpdyHeaderBlock::GetStorage() { |
std::unique_ptr<base::Value> SpdyHeaderBlockNetLogCallback( |
const SpdyHeaderBlock* headers, |
NetLogCaptureMode capture_mode) { |
- std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
- base::DictionaryValue* headers_dict = new base::DictionaryValue(); |
+ auto dict = base::MakeUnique<base::DictionaryValue>(); |
+ auto headers_dict = base::MakeUnique<base::DictionaryValue>(); |
for (SpdyHeaderBlock::const_iterator it = headers->begin(); |
it != headers->end(); ++it) { |
- headers_dict->SetWithoutPathExpansion( |
+ headers_dict->SetStringWithoutPathExpansion( |
it->first.as_string(), |
- new base::Value(ElideHeaderValueForNetLog( |
- capture_mode, it->first.as_string(), it->second.as_string()))); |
+ ElideHeaderValueForNetLog(capture_mode, it->first.as_string(), |
+ it->second.as_string())); |
} |
- dict->Set("headers", headers_dict); |
+ dict->Set("headers", std::move(headers_dict)); |
return std::move(dict); |
} |