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

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: Use impl directly. 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
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..59839b265dc62063a23928f4d17b3fcf1e8dd7f3 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,19 @@ 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));
+ std::copy(trace_message_filters_.begin(), trace_message_filters_.end(),
dcheng 2015/07/23 21:11:33 filters->insert(trace_message_filters_.begin(), tr
shatch 2015/07/23 23:06:52 Done.
+ std::inserter(*filters, filters->end()));
+}
+
void TracingControllerImpl::OnProcessMemoryDumpResponse(
TraceMessageFilter* trace_message_filter,
uint64 dump_guid,

Powered by Google App Engine
This is Rietveld 408576698