| Index: content/browser/devtools/devtools_tracing_handler.cc
|
| diff --git a/content/browser/devtools/devtools_tracing_handler.cc b/content/browser/devtools/devtools_tracing_handler.cc
|
| index 981c2047836269c9959959c32a324101ed73f4a1..0721fd2c1faac5280be0c0c00fa716abc9f90bb9 100644
|
| --- a/content/browser/devtools/devtools_tracing_handler.cc
|
| +++ b/content/browser/devtools/devtools_tracing_handler.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/callback.h"
|
| +#include "base/debug/trace_event_impl.h"
|
| #include "base/file_util.h"
|
| #include "base/json/json_reader.h"
|
| #include "base/json/json_writer.h"
|
| @@ -116,23 +117,23 @@ void DevToolsTracingHandler::OnTraceDataCollected(
|
| SendRawMessage(message);
|
| }
|
|
|
| -TracingController::Options DevToolsTracingHandler::TraceOptionsFromString(
|
| +base::debug::TraceOptions DevToolsTracingHandler::TraceOptionsFromString(
|
| const std::string& options) {
|
| std::vector<std::string> split;
|
| std::vector<std::string>::iterator iter;
|
| - int ret = 0;
|
| + base::debug::TraceOptions ret;
|
|
|
| base::SplitString(options, ',', &split);
|
| for (iter = split.begin(); iter != split.end(); ++iter) {
|
| if (*iter == kRecordUntilFull) {
|
| - ret &= ~TracingController::RECORD_CONTINUOUSLY;
|
| + ret.record_mode = base::debug::TraceOptions::RECORD_UNTIL_FULL;
|
| } else if (*iter == kRecordContinuously) {
|
| - ret |= TracingController::RECORD_CONTINUOUSLY;
|
| + ret.record_mode = base::debug::TraceOptions::RECORD_CONTINUOUSLY;
|
| } else if (*iter == kEnableSampling) {
|
| - ret |= TracingController::ENABLE_SAMPLING;
|
| + ret.EnableSampling(true);
|
| }
|
| }
|
| - return static_cast<TracingController::Options>(ret);
|
| + return ret;
|
| }
|
|
|
| scoped_refptr<DevToolsProtocol::Response>
|
| @@ -144,7 +145,7 @@ DevToolsTracingHandler::OnStart(
|
| if (params)
|
| params->GetString(devtools::Tracing::start::kParamCategories, &categories);
|
|
|
| - TracingController::Options options = TracingController::DEFAULT_OPTIONS;
|
| + base::debug::TraceOptions options;
|
| if (params && params->HasKey(devtools::Tracing::start::kParamOptions)) {
|
| std::string options_param;
|
| params->GetString(devtools::Tracing::start::kParamOptions, &options_param);
|
| @@ -177,12 +178,15 @@ DevToolsTracingHandler::OnStart(
|
| // tracing agent in the renderer.
|
| if (target_ == Renderer) {
|
| TracingController::GetInstance()->EnableRecording(
|
| - categories, options, TracingController::EnableRecordingDoneCallback());
|
| + categories,
|
| + options,
|
| + TracingController::EnableRecordingDoneCallback());
|
| return NULL;
|
| }
|
|
|
| TracingController::GetInstance()->EnableRecording(
|
| - categories, options,
|
| + categories,
|
| + options,
|
| base::Bind(&DevToolsTracingHandler::OnTracingStarted,
|
| weak_factory_.GetWeakPtr(),
|
| command));
|
|
|