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

Unified Diff: net/udp/udp_net_log_parameters.cc

Issue 1149763005: Change NetLog::ParametersCallback to return a scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments on ownership removed Created 5 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/ssl/openssl_ssl_util.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/udp/udp_net_log_parameters.cc
diff --git a/net/udp/udp_net_log_parameters.cc b/net/udp/udp_net_log_parameters.cc
index fb25b4c70a967c47125fc54421f18cfcf3114202..423f074605c1a1180607155b74ed1bc8fe27a6ab 100644
--- a/net/udp/udp_net_log_parameters.cc
+++ b/net/udp/udp_net_log_parameters.cc
@@ -13,24 +13,26 @@ namespace net {
namespace {
-base::Value* NetLogUDPDataTranferCallback(int byte_count,
- const char* bytes,
- const IPEndPoint* address,
- NetLogCaptureMode capture_mode) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+scoped_ptr<base::Value> NetLogUDPDataTranferCallback(
+ int byte_count,
+ const char* bytes,
+ const IPEndPoint* address,
+ NetLogCaptureMode capture_mode) {
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetInteger("byte_count", byte_count);
if (capture_mode.include_socket_bytes())
dict->SetString("hex_encoded_bytes", base::HexEncode(bytes, byte_count));
if (address)
dict->SetString("address", address->ToString());
- return dict;
+ return dict.Pass();
}
-base::Value* NetLogUDPConnectCallback(const IPEndPoint* address,
- NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+scoped_ptr<base::Value> NetLogUDPConnectCallback(
+ const IPEndPoint* address,
+ NetLogCaptureMode /* capture_mode */) {
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("address", address->ToString());
- return dict;
+ return dict.Pass();
}
} // namespace
« no previous file with comments | « net/ssl/openssl_ssl_util.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698