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