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

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

Issue 1243743002: Slow Reports - Add message filter to trigger background traces from child processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed dcheng's comments. Created 5 years, 5 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 7b1452f982d1f0700fbf16cc553ba7011bdaa8c3..6c67dd3359639c648c73cead6fd842d5bd58b4dc 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -484,6 +484,8 @@ void TracingControllerImpl::AddTraceMessageFilter(
trace_message_filter->SendEnableMonitoring(
TraceLog::GetInstance()->GetCurrentTraceConfig());
}
+ if (!trace_message_filter_added_callback_.is_null())
+ trace_message_filter_added_callback_.Run(trace_message_filter);
}
void TracingControllerImpl::RemoveTraceMessageFilter(
@@ -825,6 +827,18 @@ bool TracingControllerImpl::IsCoordinatorProcess() const {
return true;
}
+void TracingControllerImpl::SetTraceMessageFilterAddedCallback(
+ const TraceMessageFilterAddedCallback& callback) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ trace_message_filter_added_callback_ = callback;
+}
+
+void TracingControllerImpl::GetTraceMessageFilters(
+ TraceMessageFilterSet* filters) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ filters->insert(trace_message_filters_.begin(), trace_message_filters_.end());
+}
+
void TracingControllerImpl::OnProcessMemoryDumpResponse(
TraceMessageFilter* trace_message_filter,
uint64 dump_guid,
« 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