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

Unified Diff: net/disk_cache/simple/simple_net_log_parameters.cc

Issue 1135373002: Updated NetLog::ParametersCallback & all related calbacks returning value as scoped_ptr<base::Value… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/disk_cache/net_log_parameters.cc ('k') | net/dns/dns_config_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_net_log_parameters.cc
diff --git a/net/disk_cache/simple/simple_net_log_parameters.cc b/net/disk_cache/simple/simple_net_log_parameters.cc
index f3d9fe5b40ee95fee8cd38d9b21b81a8576f9e84..6fd7a02fa81f087d1011ac846eb74317faacf5a4 100644
--- a/net/disk_cache/simple/simple_net_log_parameters.cc
+++ b/net/disk_cache/simple/simple_net_log_parameters.cc
@@ -15,24 +15,24 @@
namespace {
-base::Value* NetLogSimpleEntryConstructionCallback(
+scoped_ptr<base::Value> NetLogSimpleEntryConstructionCallback(
const disk_cache::SimpleEntryImpl* entry,
net::NetLogCaptureMode capture_mode) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("entry_hash",
base::StringPrintf("%#016" PRIx64, entry->entry_hash()));
- return dict;
+ return dict.Pass();
}
-base::Value* NetLogSimpleEntryCreationCallback(
+scoped_ptr<base::Value> NetLogSimpleEntryCreationCallback(
const disk_cache::SimpleEntryImpl* entry,
int net_error,
net::NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetInteger("net_error", net_error);
if (net_error == net::OK)
dict->SetString("key", entry->key());
- return dict;
+ return dict.Pass();
}
} // namespace
@@ -42,14 +42,14 @@ namespace disk_cache {
net::NetLog::ParametersCallback CreateNetLogSimpleEntryConstructionCallback(
const SimpleEntryImpl* entry) {
DCHECK(entry);
- return base::Bind(&NetLogSimpleEntryConstructionCallback, entry);
+ return base::Bind(NetLogSimpleEntryConstructionCallback, entry);
}
net::NetLog::ParametersCallback CreateNetLogSimpleEntryCreationCallback(
const SimpleEntryImpl* entry,
int net_error) {
DCHECK(entry);
- return base::Bind(&NetLogSimpleEntryCreationCallback, entry, net_error);
+ return base::Bind(NetLogSimpleEntryCreationCallback, entry, net_error);
}
} // namespace disk_cache
« no previous file with comments | « net/disk_cache/net_log_parameters.cc ('k') | net/dns/dns_config_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698