Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / components / tracing / child_trace_message_filter.cc
index 3df0f70..fe13ff5 100644 (file)
@@ -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
@@ -59,11 +59,12 @@ void ChildTraceMessageFilter::OnBeginTracing(
       browser_time;
   TraceLog::GetInstance()->SetTimeOffset(time_offset);
 #endif
-
+  base::debug::TraceOptions trace_options;
+  trace_options.SetFromString(options);
   TraceLog::GetInstance()->SetEnabled(
       base::debug::CategoryFilter(category_filter_str),
       base::debug::TraceLog::RECORDING_MODE,
-      static_cast<base::debug::TraceLog::Options>(options));
+      trace_options);
 }
 
 void ChildTraceMessageFilter::OnEndTracing() {
@@ -80,11 +81,13 @@ void ChildTraceMessageFilter::OnEndTracing() {
 void ChildTraceMessageFilter::OnEnableMonitoring(
     const std::string& category_filter_str,
     base::TimeTicks browser_time,
-    int options) {
+    const std::string& options) {
+  base::debug::TraceOptions trace_options;
+  trace_options.SetFromString(options);
   TraceLog::GetInstance()->SetEnabled(
       base::debug::CategoryFilter(category_filter_str),
       base::debug::TraceLog::MONITORING_MODE,
-      static_cast<base::debug::TraceLog::Options>(options));
+      trace_options);
 }
 
 void ChildTraceMessageFilter::OnDisableMonitoring() {