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

Unified Diff: components/tracing/child_trace_message_filter.cc

Issue 1126553005: Set the content/ trace event PII whitelist to be the arg-filtering predicate in TraceLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@final_dropargs_predicate
Patch Set: Created 5 years, 7 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 | « components/tracing/DEPS ('k') | content/browser/tracing/tracing_controller_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/tracing/child_trace_message_filter.cc
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc
index 3dd1223d643140e67ec30bb63695cd464107d134..12bf3cf418095b79614d2a821e4ea94e8490e92f 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -8,6 +8,7 @@
#include "base/trace_event/trace_event.h"
#include "components/tracing/child_memory_dump_manager_delegate_impl.h"
#include "components/tracing/tracing_messages.h"
+#include "content/common/trace_event_args_whitelist.h"
#include "ipc/ipc_channel.h"
using base::trace_event::TraceLog;
@@ -75,6 +76,13 @@ void ChildTraceMessageFilter::OnBeginTracing(
base::trace_event::CategoryFilter(category_filter_str),
base::trace_event::TraceLog::RECORDING_MODE,
trace_options);
+
+#if !defined(__native_client__)
+ if (trace_options.enable_args_whitelist) {
+ TraceLog::GetInstance()->SetEventFilterPredicate(
+ base::Bind(&content::IsTraceEventArgsWhitelisted));
+ }
+#endif
}
void ChildTraceMessageFilter::OnEndTracing() {
@@ -98,6 +106,13 @@ void ChildTraceMessageFilter::OnEnableMonitoring(
base::trace_event::CategoryFilter(category_filter_str),
base::trace_event::TraceLog::MONITORING_MODE,
trace_options);
+
+#if !defined(__native_client__)
+ if (trace_options.enable_args_whitelist) {
+ TraceLog::GetInstance()->SetEventFilterPredicate(
+ base::Bind(&content::IsTraceEventArgsWhitelisted));
+ }
+#endif
}
void ChildTraceMessageFilter::OnDisableMonitoring() {
« no previous file with comments | « components/tracing/DEPS ('k') | content/browser/tracing/tracing_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698