| 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 <string> | 10 #include <string> |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 void SetTraceRecordMode(TraceRecordMode mode) { record_mode_ = mode; } | 147 void SetTraceRecordMode(TraceRecordMode mode) { record_mode_ = mode; } |
| 148 void EnableSampling() { enable_sampling_ = true; } | 148 void EnableSampling() { enable_sampling_ = true; } |
| 149 void EnableSystrace() { enable_systrace_ = true; } | 149 void EnableSystrace() { enable_systrace_ = true; } |
| 150 void EnableArgumentFilter() { enable_argument_filter_ = true; } | 150 void EnableArgumentFilter() { enable_argument_filter_ = true; } |
| 151 | 151 |
| 152 // Writes the string representation of the TraceConfig. The string is JSON | 152 // Writes the string representation of the TraceConfig. The string is JSON |
| 153 // formatted. | 153 // formatted. |
| 154 std::string ToString() const; | 154 std::string ToString() const; |
| 155 | 155 |
| 156 // Returns a scoped_refptr and wrap TraceConfig in ConvertableToTraceFormat | 156 // Returns a copy of the TraceConfig wrapped in a ConvertableToTraceFormat |
| 157 scoped_refptr<ConvertableToTraceFormat> AsConvertableToTraceFormat() const; | 157 scoped_ptr<ConvertableToTraceFormat> AsConvertableToTraceFormat() const; |
| 158 | 158 |
| 159 // Write the string representation of the CategoryFilter part. | 159 // Write the string representation of the CategoryFilter part. |
| 160 std::string ToCategoryFilterString() const; | 160 std::string ToCategoryFilterString() const; |
| 161 | 161 |
| 162 // Returns true if at least one category in the list is enabled by this | 162 // Returns true if at least one category in the list is enabled by this |
| 163 // trace config. | 163 // trace config. |
| 164 bool IsCategoryGroupEnabled(const char* category_group) const; | 164 bool IsCategoryGroupEnabled(const char* category_group) const; |
| 165 | 165 |
| 166 // Merges config with the current TraceConfig | 166 // Merges config with the current TraceConfig |
| 167 void Merge(const TraceConfig& config); | 167 void Merge(const TraceConfig& config); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 StringList included_categories_; | 236 StringList included_categories_; |
| 237 StringList disabled_categories_; | 237 StringList disabled_categories_; |
| 238 StringList excluded_categories_; | 238 StringList excluded_categories_; |
| 239 StringList synthetic_delays_; | 239 StringList synthetic_delays_; |
| 240 }; | 240 }; |
| 241 | 241 |
| 242 } // namespace trace_event | 242 } // namespace trace_event |
| 243 } // namespace base | 243 } // namespace base |
| 244 | 244 |
| 245 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_H_ | 245 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_H_ |
| OLD | NEW |