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

Unified Diff: components/tracing/child_trace_message_filter.cc

Issue 1115343002: Added a whitelist for trace events that are known to be PII-less. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved whitelist to chrome 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
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..c9ddeb6be5e901e32f79974a2d574bf0e3535c74 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/public/common/tracing_utils.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(
+ content::GetTraceEventFilterPredicate());
+ }
+#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(
+ content::GetTraceEventFilterPredicate());
+ }
+#endif
}
void ChildTraceMessageFilter::OnDisableMonitoring() {

Powered by Google App Engine
This is Rietveld 408576698