| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_TRACE_EVENT_TRACE_CONFIG_H_ | 5 #ifndef BASE_TRACE_EVENT_TRACE_CONFIG_H_ |
| 6 #define BASE_TRACE_EVENT_TRACE_CONFIG_H_ | 6 #define BASE_TRACE_EVENT_TRACE_CONFIG_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 EventFilterConfig& operator=(const EventFilterConfig& rhs); | 96 EventFilterConfig& operator=(const EventFilterConfig& rhs); |
| 97 | 97 |
| 98 void InitializeFromConfigDict(const base::DictionaryValue* event_filter); | 98 void InitializeFromConfigDict(const base::DictionaryValue* event_filter); |
| 99 | 99 |
| 100 void SetCategoryFilter(const TraceConfigCategoryFilter& category_filter); | 100 void SetCategoryFilter(const TraceConfigCategoryFilter& category_filter); |
| 101 | 101 |
| 102 void ToDict(DictionaryValue* filter_dict) const; | 102 void ToDict(DictionaryValue* filter_dict) const; |
| 103 | 103 |
| 104 bool GetArgAsSet(const char* key, std::unordered_set<std::string>*) const; | 104 bool GetArgAsSet(const char* key, std::unordered_set<std::string>*) const; |
| 105 | 105 |
| 106 bool IsCategoryGroupEnabled(const char* category_group_name) const; | 106 bool IsCategoryGroupEnabled(const StringPiece& category_group_name) const; |
| 107 | 107 |
| 108 const std::string& predicate_name() const { return predicate_name_; } | 108 const std::string& predicate_name() const { return predicate_name_; } |
| 109 base::DictionaryValue* filter_args() const { return args_.get(); } | 109 base::DictionaryValue* filter_args() const { return args_.get(); } |
| 110 const TraceConfigCategoryFilter& category_filter() const { | 110 const TraceConfigCategoryFilter& category_filter() const { |
| 111 return category_filter_; | 111 return category_filter_; |
| 112 } | 112 } |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 std::string predicate_name_; | 115 std::string predicate_name_; |
| 116 TraceConfigCategoryFilter category_filter_; | 116 TraceConfigCategoryFilter category_filter_; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 // Returns a copy of the TraceConfig wrapped in a ConvertableToTraceFormat | 225 // Returns a copy of the TraceConfig wrapped in a ConvertableToTraceFormat |
| 226 std::unique_ptr<ConvertableToTraceFormat> AsConvertableToTraceFormat() const; | 226 std::unique_ptr<ConvertableToTraceFormat> AsConvertableToTraceFormat() const; |
| 227 | 227 |
| 228 // Write the string representation of the CategoryFilter part. | 228 // Write the string representation of the CategoryFilter part. |
| 229 std::string ToCategoryFilterString() const; | 229 std::string ToCategoryFilterString() const; |
| 230 | 230 |
| 231 // Returns true if at least one category in the list is enabled by this | 231 // Returns true if at least one category in the list is enabled by this |
| 232 // trace config. This is used to determine if the category filters are | 232 // trace config. This is used to determine if the category filters are |
| 233 // enabled in the TRACE_* macros. | 233 // enabled in the TRACE_* macros. |
| 234 bool IsCategoryGroupEnabled(const char* category_group_name) const; | 234 bool IsCategoryGroupEnabled(const StringPiece& category_group_name) const; |
| 235 | 235 |
| 236 // Merges config with the current TraceConfig | 236 // Merges config with the current TraceConfig |
| 237 void Merge(const TraceConfig& config); | 237 void Merge(const TraceConfig& config); |
| 238 | 238 |
| 239 void Clear(); | 239 void Clear(); |
| 240 | 240 |
| 241 // Clears and resets the memory dump config. | 241 // Clears and resets the memory dump config. |
| 242 void ResetMemoryDumpConfig(const MemoryDumpConfig& memory_dump_config); | 242 void ResetMemoryDumpConfig(const MemoryDumpConfig& memory_dump_config); |
| 243 | 243 |
| 244 const TraceConfigCategoryFilter& category_filter() const { | 244 const TraceConfigCategoryFilter& category_filter() const { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 | 291 |
| 292 MemoryDumpConfig memory_dump_config_; | 292 MemoryDumpConfig memory_dump_config_; |
| 293 | 293 |
| 294 EventFilters event_filters_; | 294 EventFilters event_filters_; |
| 295 }; | 295 }; |
| 296 | 296 |
| 297 } // namespace trace_event | 297 } // namespace trace_event |
| 298 } // namespace base | 298 } // namespace base |
| 299 | 299 |
| 300 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_H_ | 300 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_H_ |
| OLD | NEW |