Index: base/trace_event/trace_event_filter.h |
diff --git a/base/trace_event/trace_event_filter.h b/base/trace_event/trace_event_filter.h |
index 48c6711432fdadc013b3b6ca5be668d42337e98e..a23c6a2a96e30209f0c6509d7e961a1099bf7712 100644 |
--- a/base/trace_event/trace_event_filter.h |
+++ b/base/trace_event/trace_event_filter.h |
@@ -29,7 +29,15 @@ class TraceEvent; |
// different threads. |
class BASE_EXPORT TraceEventFilter { |
public: |
- TraceEventFilter(); |
+ // Basic configuration shared by all filters. |
+ class Config { |
+ public: |
+ Config(); |
+ virtual ~Config(); |
+ virtual bool IsEnabledForCategory(const char* category_name) const = 0; |
+ }; |
+ |
+ explicit TraceEventFilter(std::unique_ptr<Config>); |
virtual ~TraceEventFilter(); |
// If the category is ENABLED_FOR_RECORDING, the event is added iff all the |
@@ -41,7 +49,11 @@ class BASE_EXPORT TraceEventFilter { |
virtual void EndEvent(const char* category_name, |
const char* event_name) const; |
+ bool IsEnabledForCategory(const char* category_name) const; |
+ |
private: |
+ std::unique_ptr<const Config> config_; |
+ |
DISALLOW_COPY_AND_ASSIGN(TraceEventFilter); |
}; |