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

Unified Diff: components/tracing/common/trace_startup.cc

Issue 2466873002: Enable FILTERING_MODE for tracing if event filters were given in config (Closed)
Patch Set: Rebase and add TODO. Created 3 years, 9 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: components/tracing/common/trace_startup.cc
diff --git a/components/tracing/common/trace_startup.cc b/components/tracing/common/trace_startup.cc
index 2c8ae37025cf15ee8e19e057ecf64b412f6bdecd..551564c6709d4d7880259db80478cb60b4af0b96 100644
--- a/components/tracing/common/trace_startup.cc
+++ b/components/tracing/common/trace_startup.cc
@@ -38,10 +38,14 @@ void EnableStartupTracingIfNeeded(bool can_access_file_system) {
trace_config, base::trace_event::TraceLog::RECORDING_MODE);
} else if (can_access_file_system &&
tracing::TraceConfigFile::GetInstance()->IsEnabled()) {
+ const base::trace_event::TraceConfig& trace_config =
+ tracing::TraceConfigFile::GetInstance()->GetTraceConfig();
+ uint8_t modes = base::trace_event::TraceLog::RECORDING_MODE;
+ if (!trace_config.event_filters().empty())
+ modes |= base::trace_event::TraceLog::FILTERING_MODE;
// This checks kTraceConfigFile switch.
base::trace_event::TraceLog::GetInstance()->SetEnabled(
- tracing::TraceConfigFile::GetInstance()->GetTraceConfig(),
- base::trace_event::TraceLog::RECORDING_MODE);
+ tracing::TraceConfigFile::GetInstance()->GetTraceConfig(), modes);
}
}
« no previous file with comments | « components/tracing/child/child_trace_message_filter.cc ('k') | content/browser/tracing/tracing_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698