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; |