Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2884)

Unified Diff: base/trace_event/trace_config.h

Issue 2061923002: Fix default category filter for tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/trace_event/trace_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_config.h
diff --git a/base/trace_event/trace_config.h b/base/trace_event/trace_config.h
index 57e61781d7e09c893a2415af0c35538d4f6cd7a0..73db56a7ef7d9f913cf13ff68f189753eb4f148a 100644
--- a/base/trace_event/trace_config.h
+++ b/base/trace_event/trace_config.h
@@ -188,7 +188,8 @@ class BASE_EXPORT TraceConfig {
std::string ToCategoryFilterString() const;
// Returns true if at least one category in the list is enabled by this
- // trace config.
+ // trace config. This is used to determine if the category filters are
+ // enabled in the TRACE_* macros.
bool IsCategoryGroupEnabled(const char* category_group) const;
// Merges config with the current TraceConfig
@@ -207,7 +208,6 @@ class BASE_EXPORT TraceConfig {
FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidLegacyFormat);
FRIEND_TEST_ALL_PREFIXES(TraceConfigTest,
TraceConfigFromInvalidLegacyStrings);
- FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, ConstructDefaultTraceConfig);
FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidString);
FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromInvalidString);
FRIEND_TEST_ALL_PREFIXES(TraceConfigTest,
@@ -215,6 +215,8 @@ class BASE_EXPORT TraceConfig {
FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromMemoryConfigString);
FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, LegacyStringToMemoryDumpConfig);
FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, EmptyMemoryDumpConfigTest);
+ FRIEND_TEST_ALL_PREFIXES(TraceConfigTest,
+ EmptyAndAsteriskCategoryFilterString);
// The default trace config, used when none is provided.
// Allows all non-disabled-by-default categories through, except if they end
@@ -253,7 +255,9 @@ class BASE_EXPORT TraceConfig {
void WriteCategoryFilterString(const StringList& delays,
std::string* out) const;
- // Returns true if category is enable according to this trace config.
+ // Returns true if the category is enable according to this trace config.
Primiano Tucci (use gerrit) 2016/06/14 15:13:03 since you are touching this line: s/enable/enabled
Zhen Wang 2016/06/14 20:55:08 Done.
+ // This is only used internally. Please refer to IsCategoryGroupEnabled()
Primiano Tucci (use gerrit) 2016/06/14 15:13:02 Well it's not that this is internal. It's more tha
Zhen Wang 2016/06/14 20:55:08 Updated.
+ // when determining the enabled category filters.
bool IsCategoryEnabled(const char* category_name) const;
static bool IsEmptyOrContainsLeadingOrTrailingWhitespace(
« no previous file with comments | « no previous file | base/trace_event/trace_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698