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

Unified Diff: net/disk_cache/memory/mem_entry_impl.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/cert/x509_certificate_net_log_param.cc ('k') | net/disk_cache/net_log_parameters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/memory/mem_entry_impl.cc
diff --git a/net/disk_cache/memory/mem_entry_impl.cc b/net/disk_cache/memory/mem_entry_impl.cc
index a5d9086ec0e93f913146137dfb61a9b0863ef437..f39e09d8987e3eca8437c76a59836a0bb1ce8749 100644
--- a/net/disk_cache/memory/mem_entry_impl.cc
+++ b/net/disk_cache/memory/mem_entry_impl.cc
@@ -45,14 +45,14 @@ std::string GenerateChildName(const std::string& base_name, int child_id) {
// Returns NetLog parameters for the creation of a child MemEntryImpl. Separate
// function needed because child entries don't suppport GetKey().
-base::Value* NetLogChildEntryCreationCallback(
+scoped_ptr<base::Value> NetLogChildEntryCreationCallback(
const disk_cache::MemEntryImpl* parent,
int child_id,
net::NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("key", GenerateChildName(parent->GetKey(), child_id));
dict->SetBoolean("created", true);
- return dict;
+ return dict.Pass();
}
} // namespace
@@ -565,7 +565,7 @@ bool MemEntryImpl::InitChildEntry(MemEntryImpl* parent, int child_id,
net::NetLog::SOURCE_MEMORY_CACHE_ENTRY);
net_log_.BeginEvent(
net::NetLog::TYPE_DISK_CACHE_MEM_ENTRY_IMPL,
- base::Bind(&NetLogChildEntryCreationCallback, parent, child_id_));
+ base::Bind(NetLogChildEntryCreationCallback, parent, child_id_));
parent_ = parent;
child_id_ = child_id;
« no previous file with comments | « net/cert/x509_certificate_net_log_param.cc ('k') | net/disk_cache/net_log_parameters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698