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

Unified Diff: net/spdy/core/spdy_header_block.cc

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 years, 8 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/socket/client_socket_pool_base.cc ('k') | services/preferences/tracked/pref_hash_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « net/socket/client_socket_pool_base.cc ('k') | services/preferences/tracked/pref_hash_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698