| 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 e16768f6dc8c8b2ad00a9c11e5414969fb965c2b..20b397d737628d8cbf2d7fb0ddf766871562887e 100644
|
| --- a/content/browser/devtools/devtools_tracing_handler.cc
|
| +++ b/content/browser/devtools/devtools_tracing_handler.cc
|
| @@ -26,6 +26,7 @@ const char kTracingCompleteNotification[] = "Tracing.tracingComplete";
|
| const char kTracingDataCollected[] = "Tracing.dataCollected";
|
|
|
| const char kCategoriesParam[] = "categories";
|
| +const char kTraceModeParam[] = "trace-mode";
|
|
|
| } // namespace
|
|
|
| @@ -63,7 +64,15 @@ DevToolsTracingHandler::OnStart(DevToolsProtocol::Command* command) {
|
| base::DictionaryValue* params = command->params();
|
| if (params && params->HasKey(kCategoriesParam))
|
| params->GetString(kCategoriesParam, &categories);
|
| - TraceController::GetInstance()->BeginTracing(this, categories);
|
| +
|
| + base::debug::TraceLog::TraceMode mode = base::debug::TraceLog::UNTIL_FULL;
|
| + if (params && params->HasKey(kTraceModeParam)) {
|
| + std::string mode_param;
|
| + params->GetString(kTraceModeParam, &mode_param);
|
| + mode = base::debug::TraceLog::TraceModeFromString(mode_param);
|
| + }
|
| +
|
| + TraceController::GetInstance()->BeginTracing(this, categories, mode);
|
| is_running_ = true;
|
| return command->SuccessResponse(NULL);
|
| }
|
|
|