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

Unified Diff: components/tracing/child_trace_message_filter.cc

Issue 425593002: Refactor trace_event_impl's SetEnabled to use TraceOptions. Propagate this through the whole stack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address joechan's comments Created 6 years, 4 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 | « components/tracing/child_trace_message_filter.h ('k') | components/tracing/tracing_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3df0f7075fc60171e4ed54b112299db42ccea893..e3daa1a85dac01eef2262284fd6984ccc6139f70 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -50,7 +50,7 @@ ChildTraceMessageFilter::~ChildTraceMessageFilter() {}
void ChildTraceMessageFilter::OnBeginTracing(
const std::string& category_filter_str,
base::TimeTicks browser_time,
- int options) {
+ const std::string& options) {
#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
@@ -63,7 +63,7 @@ void ChildTraceMessageFilter::OnBeginTracing(
TraceLog::GetInstance()->SetEnabled(
base::debug::CategoryFilter(category_filter_str),
base::debug::TraceLog::RECORDING_MODE,
- static_cast<base::debug::TraceLog::Options>(options));
+ base::debug::TraceOptions(options));
}
void ChildTraceMessageFilter::OnEndTracing() {
@@ -80,11 +80,11 @@ void ChildTraceMessageFilter::OnEndTracing() {
void ChildTraceMessageFilter::OnEnableMonitoring(
const std::string& category_filter_str,
base::TimeTicks browser_time,
- int options) {
+ const std::string& options) {
TraceLog::GetInstance()->SetEnabled(
base::debug::CategoryFilter(category_filter_str),
base::debug::TraceLog::MONITORING_MODE,
- static_cast<base::debug::TraceLog::Options>(options));
+ base::debug::TraceOptions(options));
}
void ChildTraceMessageFilter::OnDisableMonitoring() {
« no previous file with comments | « components/tracing/child_trace_message_filter.h ('k') | components/tracing/tracing_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698