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

Unified Diff: net/quic/quic_connection_logger.cc

Issue 2058233002: Rewrite simple uses of base::ListValue::Append() taking a raw pointer var. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: less comments more ownership Created 4 years, 6 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/log/net_log_util.cc ('k') | pdf/pdfium/pdfium_page.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_logger.cc
diff --git a/net/quic/quic_connection_logger.cc b/net/quic/quic_connection_logger.cc
index dca50eb71c627682d9f81fde83909b680f0eb885..7caa52fd2f2cf869b55116c711014dc8c3fc1b99 100644
--- a/net/quic/quic_connection_logger.cc
+++ b/net/quic/quic_connection_logger.cc
@@ -6,6 +6,7 @@
#include <algorithm>
#include <limits>
+#include <memory>
#include <utility>
#include <vector>
@@ -127,11 +128,11 @@ std::unique_ptr<base::Value> NetLogQuicAckFrameCallback(
const PacketTimeVector& received_times = frame->received_packet_times;
for (PacketTimeVector::const_iterator it = received_times.begin();
it != received_times.end(); ++it) {
- base::DictionaryValue* info = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> info(new base::DictionaryValue());
info->SetInteger("packet_number", static_cast<int>(it->first));
info->SetString("received",
base::Int64ToString(it->second.ToDebuggingValue()));
- received->Append(info);
+ received->Append(std::move(info));
}
return std::move(dict);
« no previous file with comments | « net/log/net_log_util.cc ('k') | pdf/pdfium/pdfium_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698