Chromium Code Reviews| 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..3925889457dcd8087ce8c9d1bde22124fe8edb72 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; |
|
alph
2016/07/27 21:47:11
padding
|
| + } |
| return Response::InternalError("Tracing is already started"); |
| + } |
| if (config && (categories || options)) { |
| return Response::InternalError( |