| Index: content/browser/devtools/protocol/tracing_handler.cc
|
| diff --git a/content/browser/devtools/protocol/tracing_handler.cc b/content/browser/devtools/protocol/tracing_handler.cc
|
| index 12f9c1899e8191997da2b1bc5fe26e71ce3e8d5e..38ee2cc3c2d63a53d67ab6442f989e0c4851fdfa 100644
|
| --- a/content/browser/devtools/protocol/tracing_handler.cc
|
| +++ b/content/browser/devtools/protocol/tracing_handler.cc
|
| @@ -179,8 +179,16 @@ Response TracingHandler::Start(
|
| const double* buffer_usage_reporting_interval,
|
| const std::string* transfer_mode,
|
| const std::unique_ptr<base::DictionaryValue>& config) {
|
| - if (IsTracing())
|
| + if (IsTracing()) {
|
| + if (!did_initiate_recording_ && IsStartupTracingActive()) {
|
| + // If tracing is already running because it was initiated by startup
|
| + // tracing, honor the transfer mode update, as that's the only way
|
| + // for the client to communicate it.
|
| + return_as_stream_ =
|
| + transfer_mode && *transfer_mode == start::kTransferModeReturnAsStream;
|
| + }
|
| return Response::InternalError("Tracing is already started");
|
| + }
|
|
|
| if (config && (categories || options)) {
|
| return Response::InternalError(
|
|
|