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

Unified Diff: base/trace_event/trace_config.cc

Issue 2034553002: Set up background memory light tracing field trials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@set_whitelist
Patch Set: Remove navigation_tracing change and add base_export. 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 | « base/trace_event/trace_config.h ('k') | content/browser/tracing/background_tracing_config_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_config.cc
diff --git a/base/trace_event/trace_config.cc b/base/trace_event/trace_config.cc
index 25a0cd6d40b5d7aee19c68a9eb06a54f2c665bd5..5e2e00835ab3e7d80325df0bee5c4b5d5e05d691 100644
--- a/base/trace_event/trace_config.cc
+++ b/base/trace_event/trace_config.cc
@@ -85,6 +85,12 @@ void TraceConfig::MemoryDumpConfig::HeapProfiler::Clear() {
breakdown_threshold_bytes = kDefaultBreakdownThresholdBytes;
}
+void TraceConfig::ResetMemoryDumpConfig(
+ const TraceConfig::MemoryDumpConfig& memory_dump_config) {
+ memory_dump_config_.Clear();
+ memory_dump_config_ = memory_dump_config;
+}
+
TraceConfig::MemoryDumpConfig::MemoryDumpConfig() {};
TraceConfig::MemoryDumpConfig::MemoryDumpConfig(
@@ -361,7 +367,7 @@ void TraceConfig::InitializeFromConfigDict(const DictionaryValue& dict) {
// category enabled. So, use the default periodic dump config.
const base::DictionaryValue* memory_dump_config = nullptr;
if (dict.GetDictionary(kMemoryDumpConfigParam, &memory_dump_config))
- SetMemoryDumpConfig(*memory_dump_config);
+ SetMemoryDumpConfigFromConfigDict(*memory_dump_config);
else
SetDefaultMemoryDumpConfig();
}
@@ -509,7 +515,7 @@ void TraceConfig::AddCategoryToDict(base::DictionaryValue& dict,
dict.Set(param, std::move(list));
}
-void TraceConfig::SetMemoryDumpConfig(
+void TraceConfig::SetMemoryDumpConfigFromConfigDict(
const base::DictionaryValue& memory_dump_config) {
// Set triggers
memory_dump_config_.triggers.clear();
« no previous file with comments | « base/trace_event/trace_config.h ('k') | content/browser/tracing/background_tracing_config_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698