| Index: base/trace_event/trace_config.h
|
| diff --git a/base/trace_event/trace_config.h b/base/trace_event/trace_config.h
|
| index 72ca5f868785691b7686fef576f6eb59218c4592..e38175ac8d242caf968c31c6643408c5f050dccc 100644
|
| --- a/base/trace_event/trace_config.h
|
| +++ b/base/trace_event/trace_config.h
|
| @@ -46,9 +46,39 @@ class BASE_EXPORT TraceConfig {
|
| uint32_t periodic_interval_ms;
|
| MemoryDumpLevelOfDetail level_of_detail;
|
| };
|
| -
|
| typedef std::vector<MemoryDumpTriggerConfig> MemoryDumpConfig;
|
|
|
| + class CategoryEventFilterConfig {
|
| + public:
|
| + CategoryEventFilterConfig(const std::string& predicate_name);
|
| + ~CategoryEventFilterConfig();
|
| +
|
| + CategoryEventFilterConfig(const CategoryEventFilterConfig& tc);
|
| + CategoryEventFilterConfig& operator=(const CategoryEventFilterConfig& rhs);
|
| +
|
| + void AddIncludedCategory(const std::string& category);
|
| + void AddExcludedCategory(const std::string& category);
|
| + void SetArgs(std::unique_ptr<base::DictionaryValue> args);
|
| +
|
| + bool IsCategoryGroupEnabled(const char* category_group_name) const;
|
| +
|
| + const std::string& predicate_name() const { return predicate_name_; }
|
| + base::DictionaryValue* args() const { return args_.get(); }
|
| + const StringList& included_categories() const {
|
| + return included_categories_;
|
| + }
|
| + const StringList& excluded_categories() const {
|
| + return excluded_categories_;
|
| + }
|
| +
|
| + private:
|
| + std::string predicate_name_;
|
| + StringList included_categories_;
|
| + StringList excluded_categories_;
|
| + std::unique_ptr<base::DictionaryValue> args_;
|
| + };
|
| + typedef std::vector<CategoryEventFilterConfig> CategoryEventFilters;
|
| +
|
| TraceConfig();
|
|
|
| // Create TraceConfig object from category filter and trace options strings.
|
| @@ -165,7 +195,7 @@ class BASE_EXPORT TraceConfig {
|
|
|
| // Returns true if at least one category in the list is enabled by this
|
| // trace config.
|
| - bool IsCategoryGroupEnabled(const char* category_group) const;
|
| + bool IsCategoryGroupEnabled(const char* category_group_name) const;
|
|
|
| // Merges config with the current TraceConfig
|
| void Merge(const TraceConfig& config);
|
| @@ -176,6 +206,10 @@ class BASE_EXPORT TraceConfig {
|
| return memory_dump_config_;
|
| }
|
|
|
| + const CategoryEventFilters& category_event_filters() const {
|
| + return category_event_filters_;
|
| + }
|
| +
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidLegacyFormat);
|
| FRIEND_TEST_ALL_PREFIXES(TraceConfigTest,
|
| @@ -214,6 +248,8 @@ class BASE_EXPORT TraceConfig {
|
| void SetMemoryDumpConfig(const base::DictionaryValue& memory_dump_config);
|
| void SetDefaultMemoryDumpConfig();
|
|
|
| + void SetCategoryEventFilters(const base::ListValue& category_event_filters);
|
| +
|
| // Convert TraceConfig to the dict representation of the TraceConfig.
|
| void ToDict(base::DictionaryValue& dict) const;
|
|
|
| @@ -244,6 +280,7 @@ class BASE_EXPORT TraceConfig {
|
| StringList disabled_categories_;
|
| StringList excluded_categories_;
|
| StringList synthetic_delays_;
|
| + CategoryEventFilters category_event_filters_;
|
| };
|
|
|
| } // namespace trace_event
|
|
|