Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 #include "content/browser/tracing/tracing_controller_impl.h" | 4 #include "content/browser/tracing/tracing_controller_impl.h" |
| 5 | 5 |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/cpu.h" | 7 #include "base/cpu.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/json/string_escape.h" | 9 #include "base/json/string_escape.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 263 trace_config.AsConvertableToTraceFormat()); | 263 trace_config.AsConvertableToTraceFormat()); |
| 264 | 264 |
| 265 // Notify all child processes. | 265 // Notify all child processes. |
| 266 for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin(); | 266 for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin(); |
| 267 it != trace_message_filters_.end(); ++it) { | 267 it != trace_message_filters_.end(); ++it) { |
| 268 it->get()->SendBeginTracing(trace_config); | 268 it->get()->SendBeginTracing(trace_config); |
| 269 } | 269 } |
| 270 | 270 |
| 271 if (!callback.is_null()) | 271 if (!callback.is_null()) |
| 272 callback.Run(); | 272 callback.Run(); |
| 273 | |
| 274 start_tracing_done_callback_ = StartTracingDoneCallback(); | |
|
oystein (OOO til 10th of July)
2016/01/21 15:57:03
I think you can do start_tracing_done_callback_.Re
Zhen Wang
2016/01/21 21:14:05
Done.
| |
| 273 } | 275 } |
| 274 | 276 |
| 275 bool TracingControllerImpl::StopTracing( | 277 bool TracingControllerImpl::StopTracing( |
| 276 const scoped_refptr<TraceDataSink>& trace_data_sink) { | 278 const scoped_refptr<TraceDataSink>& trace_data_sink) { |
| 277 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 279 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 278 | 280 |
| 279 if (trace_data_sink) { | 281 if (trace_data_sink) { |
| 280 if (TraceLog::GetInstance()->GetCurrentTraceConfig() | 282 if (TraceLog::GetInstance()->GetCurrentTraceConfig() |
| 281 .IsArgumentFilterEnabled()) { | 283 .IsArgumentFilterEnabled()) { |
| 282 scoped_ptr<TracingDelegate> delegate( | 284 scoped_ptr<TracingDelegate> delegate( |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1136 is_monitoring_ = is_monitoring; | 1138 is_monitoring_ = is_monitoring; |
| 1137 #if !defined(OS_ANDROID) | 1139 #if !defined(OS_ANDROID) |
| 1138 for (std::set<TracingUI*>::iterator it = tracing_uis_.begin(); | 1140 for (std::set<TracingUI*>::iterator it = tracing_uis_.begin(); |
| 1139 it != tracing_uis_.end(); it++) { | 1141 it != tracing_uis_.end(); it++) { |
| 1140 (*it)->OnMonitoringStateChanged(is_monitoring); | 1142 (*it)->OnMonitoringStateChanged(is_monitoring); |
| 1141 } | 1143 } |
| 1142 #endif | 1144 #endif |
| 1143 } | 1145 } |
| 1144 | 1146 |
| 1145 } // namespace content | 1147 } // namespace content |
| OLD | NEW |