| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "base/trace_event/trace_config.h" | 5 #include "base/trace_event/trace_config.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 for (const auto& included_category : included_categories_) { | 200 for (const auto& included_category : included_categories_) { |
| 201 if (base::MatchPattern(category_group_token, included_category)) { | 201 if (base::MatchPattern(category_group_token, included_category)) { |
| 202 return true; | 202 return true; |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 | 206 |
| 207 return false; | 207 return false; |
| 208 } | 208 } |
| 209 | 209 |
| 210 bool TraceConfig::EventFilterConfig::IsEnabledForCategory( |
| 211 const char* category_name) const { |
| 212 return IsCategoryGroupEnabled(category_name); |
| 213 } |
| 214 |
| 210 TraceConfig::TraceConfig() { | 215 TraceConfig::TraceConfig() { |
| 211 InitializeDefault(); | 216 InitializeDefault(); |
| 212 } | 217 } |
| 213 | 218 |
| 214 TraceConfig::TraceConfig(StringPiece category_filter_string, | 219 TraceConfig::TraceConfig(StringPiece category_filter_string, |
| 215 StringPiece trace_options_string) { | 220 StringPiece trace_options_string) { |
| 216 InitializeFromStrings(category_filter_string, trace_options_string); | 221 InitializeFromStrings(category_filter_string, trace_options_string); |
| 217 } | 222 } |
| 218 | 223 |
| 219 TraceConfig::TraceConfig(StringPiece category_filter_string, | 224 TraceConfig::TraceConfig(StringPiece category_filter_string, |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 StringPiece str) { | 868 StringPiece str) { |
| 864 return str.empty() || str.front() == ' ' || str.back() == ' '; | 869 return str.empty() || str.front() == ' ' || str.back() == ' '; |
| 865 } | 870 } |
| 866 | 871 |
| 867 bool TraceConfig::HasIncludedPatterns() const { | 872 bool TraceConfig::HasIncludedPatterns() const { |
| 868 return !included_categories_.empty(); | 873 return !included_categories_.empty(); |
| 869 } | 874 } |
| 870 | 875 |
| 871 } // namespace trace_event | 876 } // namespace trace_event |
| 872 } // namespace base | 877 } // namespace base |
| OLD | NEW |