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

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

Issue 2884933002: Remove raw base::DictionaryValue::SetWithoutPathExpansion (Closed)
Patch Set: Include 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 | « 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 66d6f51b7cd16eaa05cbb15bb08ff4b6c2dfae82..0fd136cdb745cc1b3a9548cc9cc837489ed31e6b 100644
--- a/net/spdy/core/spdy_header_block.cc
+++ b/net/spdy/core/spdy_header_block.cc
@@ -331,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