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

Unified Diff: base/trace_event/trace_event_impl.h

Issue 1067233002: Added a trace option for whitewashing trace args against a known-PII-less list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed enable_args_whitelist Created 5 years, 8 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 | « no previous file | base/trace_event/trace_event_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_event_impl.h
diff --git a/base/trace_event/trace_event_impl.h b/base/trace_event/trace_event_impl.h
index 33a85c9b6ce854f4e6b6cde748fe6abca8a015d2..bfbbefa0158e3b6977ceb401c0f3ed6b6d3a1e86 100644
--- a/base/trace_event/trace_event_impl.h
+++ b/base/trace_event/trace_event_impl.h
@@ -122,7 +122,10 @@ class BASE_EXPORT TraceEvent {
void UpdateDuration(const TimeTicks& now, const TimeTicks& thread_now);
// Serialize event data to JSON
- void AppendAsJSON(std::string* out) const;
+ typedef base::Callback<bool(const char* category_group_name,
+ const char* event_name)> EventFilterPredicate;
+ void AppendAsJSON(std::string* out,
+ const EventFilterPredicate& event_filter_predicate) const;
void AppendPrettyPrinted(std::ostringstream* out) const;
static void AppendValueAsJSON(unsigned char type,
@@ -532,6 +535,8 @@ class BASE_EXPORT TraceLog {
void SetEventCallbackEnabled(const CategoryFilter& category_filter,
EventCallback cb);
void SetEventCallbackDisabled();
+ void SetEventFilterPredicate(
+ const TraceEvent::EventFilterPredicate& event_filter_predicate);
// Flush all collected events to the given output callback. The callback will
// be called one or more times either synchronously or asynchronously from
@@ -717,9 +722,10 @@ class BASE_EXPORT TraceLog {
// is called for the flush of the current |logged_events_|.
void FlushCurrentThread(int generation);
// Usually it runs on a different thread.
- static void ConvertTraceEventsToTraceFormat(
+ void ConvertTraceEventsToTraceFormat(
scoped_ptr<TraceBuffer> logged_events,
- const TraceLog::OutputCallback& flush_output_callback);
+ const TraceLog::OutputCallback& flush_output_callback,
+ const TraceEvent::EventFilterPredicate& event_filter_predicate);
void FinishFlush(int generation);
void OnFlushTimeout(int generation);
@@ -809,6 +815,7 @@ class BASE_EXPORT TraceLog {
// Set when asynchronous Flush is in progress.
OutputCallback flush_output_callback_;
+ TraceEvent::EventFilterPredicate event_filter_predicate_;
scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_;
subtle::AtomicWord generation_;
bool use_worker_thread_;
« no previous file with comments | « no previous file | base/trace_event/trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698