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

Unified Diff: content/browser/tracing/tracing_controller_impl.cc

Issue 1638443003: tracing_controller: Eliminates extra parameter of StartAgentTracingDone (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/tracing/tracing_controller_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tracing/tracing_controller_impl.cc
diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc
index c0b503dd0e1dce0fe75cfb2036628030fbcc4bfe..70edf234be4be8849a0883912a32216293d48130 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -252,8 +252,7 @@ bool TracingControllerImpl::StartTracing(
}
void TracingControllerImpl::OnStartAgentTracingDone(
- const TraceConfig& trace_config,
- const StartTracingDoneCallback& callback) {
+ const TraceConfig& trace_config) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
TRACE_EVENT_API_ADD_METADATA_EVENT("IsTimeTicksHighResolution", "value",
@@ -267,10 +266,10 @@ void TracingControllerImpl::OnStartAgentTracingDone(
it->get()->SendBeginTracing(trace_config);
}
- if (!callback.is_null())
- callback.Run();
-
- start_tracing_done_callback_.Reset();
+ if (!start_tracing_done_callback_.is_null()) {
+ start_tracing_done_callback_.Run();
+ start_tracing_done_callback_.Reset();
+ }
}
bool TracingControllerImpl::StopTracing(
@@ -883,8 +882,7 @@ bool TracingControllerImpl::StartAgentTracing(
base::Closure on_start_tracing_done_callback =
base::Bind(&TracingControllerImpl::OnStartAgentTracingDone,
- base::Unretained(this),
- trace_config, start_tracing_done_callback_);
+ base::Unretained(this), trace_config);
if (!BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(&TracingControllerImpl::SetEnabledOnFileThread,
« no previous file with comments | « content/browser/tracing/tracing_controller_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698