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

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

Issue 1502583003: [Tracing] Add metadata filter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile failure on win Created 5 years 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 13a5333fe5a642659586045f42420e0b4ed51aad..bc2eb6ea2f6d08911a05027ac525673e46d70562 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -284,8 +284,18 @@ bool TracingControllerImpl::StopTracing(
const scoped_refptr<TraceDataSink>& trace_data_sink) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (trace_data_sink)
+ if (trace_data_sink) {
+ if (TraceLog::GetInstance()->GetCurrentTraceConfig()
+ .IsArgumentFilterEnabled()) {
+ scoped_ptr<TracingDelegate> delegate(
+ GetContentClient()->browser()->GetTracingDelegate());
+ if (delegate) {
+ trace_data_sink->SetMetadataFilterPredicate(
+ delegate->GetMetadataFilterPredicate());
+ }
+ }
trace_data_sink->AddMetadata(*GenerateTracingMetadataDict().get());
+ }
if (!can_stop_tracing())
return false;

Powered by Google App Engine
This is Rietveld 408576698