Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: content/browser/tracing/tracing_controller_impl.cc

Issue 1612583002: Clear StartTracingDoneCallback after usage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698