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

Unified Diff: components/tracing/child_trace_message_filter.cc

Issue 1165673002: [Startup Tracing] Hook up TraceConfig and remove CategoryFilter & TraceOptions (Closed) 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
Index: components/tracing/child_trace_message_filter.cc
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc
index 14dec52533a2dfae69fd0451ea38b2d7fe790f56..92168aa3e5dedba5566426c61241734981b8071f 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -58,9 +58,8 @@ bool ChildTraceMessageFilter::OnMessageReceived(const IPC::Message& message) {
ChildTraceMessageFilter::~ChildTraceMessageFilter() {}
void ChildTraceMessageFilter::OnBeginTracing(
- const std::string& category_filter_str,
- base::TraceTicks browser_time,
- const std::string& options) {
+ const std::string& trace_config_str,
+ base::TraceTicks browser_time) {
#if defined(__native_client__)
// NaCl and system times are offset by a bit, so subtract some time from
// the captured timestamps. The value might be off by a bit due to messaging
@@ -68,12 +67,9 @@ void ChildTraceMessageFilter::OnBeginTracing(
base::TimeDelta time_offset = base::TraceTicks::Now() - browser_time;
TraceLog::GetInstance()->SetTimeOffset(time_offset);
#endif
- base::trace_event::TraceOptions trace_options;
- trace_options.SetFromString(options);
TraceLog::GetInstance()->SetEnabled(
- base::trace_event::CategoryFilter(category_filter_str),
- base::trace_event::TraceLog::RECORDING_MODE,
- trace_options);
+ base::trace_event::TraceConfig(trace_config_str),
+ base::trace_event::TraceLog::RECORDING_MODE);
}
void ChildTraceMessageFilter::OnEndTracing() {
@@ -88,15 +84,11 @@ void ChildTraceMessageFilter::OnEndTracing() {
}
void ChildTraceMessageFilter::OnEnableMonitoring(
- const std::string& category_filter_str,
- base::TraceTicks browser_time,
- const std::string& options) {
- base::trace_event::TraceOptions trace_options;
- trace_options.SetFromString(options);
+ const std::string& trace_config_str,
+ base::TraceTicks browser_time) {
TraceLog::GetInstance()->SetEnabled(
- base::trace_event::CategoryFilter(category_filter_str),
- base::trace_event::TraceLog::MONITORING_MODE,
- trace_options);
+ base::trace_event::TraceConfig(trace_config_str),
+ base::trace_event::TraceLog::MONITORING_MODE);
}
void ChildTraceMessageFilter::OnDisableMonitoring() {

Powered by Google App Engine
This is Rietveld 408576698