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

Unified Diff: content/browser/tracing/tracing_controller_impl.cc

Issue 2891933004: Remove raw base::DictionaryValue::Set in //content (Closed)
Patch Set: Rebase 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
Index: content/browser/tracing/tracing_controller_impl.cc
diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc
index f5c6e52c00065c62456e56018b31744cce61ffbd..11bf7c74c4ed81c61bbbd8253bf0b3fe6c025da0 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -14,6 +14,7 @@
#include "base/guid.h"
#include "base/json/string_escape.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted_memory.h"
#include "base/strings/string_number_conversions.h"
#include "base/sys_info.h"
@@ -21,6 +22,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
+#include "base/values.h"
#include "build/build_config.h"
#include "components/tracing/common/process_metrics_memory_dump_provider.h"
#include "content/browser/tracing/file_tracing_provider_impl.h"
@@ -819,7 +821,8 @@ void TracingControllerImpl::AddFilteredMetadata(
for (base::DictionaryValue::Iterator it(*metadata); !it.IsAtEnd();
it.Advance()) {
if (filter.Run(it.key()))
- filtered_metadata->Set(it.key(), it.value().DeepCopy());
+ filtered_metadata->Set(it.key(),
+ base::MakeUnique<base::Value>(it.value()));
else
filtered_metadata->SetString(it.key(), "__stripped__");
}
« no previous file with comments | « content/browser/service_worker/service_worker_internals_ui.cc ('k') | content/browser/webrtc/webrtc_internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698