| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 void SetTraceRecordMode(TraceRecordMode mode) { record_mode_ = mode; } | 151 void SetTraceRecordMode(TraceRecordMode mode) { record_mode_ = mode; } |
| 152 void EnableSampling() { enable_sampling_ = true; } | 152 void EnableSampling() { enable_sampling_ = true; } |
| 153 void EnableSystrace() { enable_systrace_ = true; } | 153 void EnableSystrace() { enable_systrace_ = true; } |
| 154 void EnableArgumentFilter() { enable_argument_filter_ = true; } | 154 void EnableArgumentFilter() { enable_argument_filter_ = true; } |
| 155 | 155 |
| 156 // Writes the string representation of the TraceConfig. The string is JSON | 156 // Writes the string representation of the TraceConfig. The string is JSON |
| 157 // formatted. | 157 // formatted. |
| 158 std::string ToString() const; | 158 std::string ToString() const; |
| 159 | 159 |
| 160 // Returns a copy of the TraceConfig wrapped in a ConvertableToTraceFormat | 160 // Returns a copy of the TraceConfig wrapped in a ConvertableToTraceFormat |
| 161 scoped_ptr<ConvertableToTraceFormat> AsConvertableToTraceFormat() const; | 161 std::unique_ptr<ConvertableToTraceFormat> AsConvertableToTraceFormat() const; |
| 162 | 162 |
| 163 // Write the string representation of the CategoryFilter part. | 163 // Write the string representation of the CategoryFilter part. |
| 164 std::string ToCategoryFilterString() const; | 164 std::string ToCategoryFilterString() const; |
| 165 | 165 |
| 166 // Returns true if at least one category in the list is enabled by this | 166 // Returns true if at least one category in the list is enabled by this |
| 167 // trace config. | 167 // trace config. |
| 168 bool IsCategoryGroupEnabled(const char* category_group) const; | 168 bool IsCategoryGroupEnabled(const char* category_group) const; |
| 169 | 169 |
| 170 // Merges config with the current TraceConfig | 170 // Merges config with the current TraceConfig |
| 171 void Merge(const TraceConfig& config); | 171 void Merge(const TraceConfig& config); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 StringList included_categories_; | 243 StringList included_categories_; |
| 244 StringList disabled_categories_; | 244 StringList disabled_categories_; |
| 245 StringList excluded_categories_; | 245 StringList excluded_categories_; |
| 246 StringList synthetic_delays_; | 246 StringList synthetic_delays_; |
| 247 }; | 247 }; |
| 248 | 248 |
| 249 } // namespace trace_event | 249 } // namespace trace_event |
| 250 } // namespace base | 250 } // namespace base |
| 251 | 251 |
| 252 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_H_ | 252 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_H_ |
| OLD | NEW |