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

Unified Diff: base/debug/trace_event_impl.h

Issue 14748003: Allow tracing categories to default to disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « base/debug/trace_event.h ('k') | base/debug/trace_event_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_impl.h
diff --git a/base/debug/trace_event_impl.h b/base/debug/trace_event_impl.h
index 30178a7699f812a9bd76c5a4425bf9968523cdc7..28bf1a09f4fe1563e82c203920a8b4087d29ba61 100644
--- a/base/debug/trace_event_impl.h
+++ b/base/debug/trace_event_impl.h
@@ -11,6 +11,7 @@
#include <vector>
#include "base/callback.h"
+#include "base/gtest_prod_util.h"
#include "base/hash_tables.h"
#include "base/memory/ref_counted_memory.h"
#include "base/memory/scoped_vector.h"
@@ -233,9 +234,6 @@ class BASE_EXPORT CategoryFilter {
// Merges nested_filter with the current CategoryFilter
void Merge(const CategoryFilter& nested_filter);
- // Determines whether or not we have explicitly allowed category patterns.
- bool HasIncludedPatterns() const;
-
// Clears both included/excluded pattern lists. This would be equivalent to
// creating a CategoryFilter with an empty string, through the constructor.
// i.e: CategoryFilter("").
@@ -244,15 +242,26 @@ class BASE_EXPORT CategoryFilter {
// are not excluding anything.
void Clear();
+ private:
+ FRIEND_TEST_ALL_PREFIXES(TraceEventTestFixture, CategoryFilter);
+
static bool IsEmptyOrContainsLeadingOrTrailingWhitespace(
const std::string& str);
- private:
+ typedef std::vector<std::string> StringList;
+
void Initialize(const std::string& filter_string);
- void WriteString(std::string* out, bool included) const;
+ void WriteString(const StringList& values,
+ std::string* out,
+ bool included) const;
+ bool HasIncludedPatterns() const;
+
+ bool DoesCategoryGroupContainCategory(const char* category_group,
+ const char* category) const;
- std::vector<std::string> included_;
- std::vector<std::string> excluded_;
+ StringList included_;
+ StringList disabled_;
+ StringList excluded_;
};
class TraceSamplingThread;
« no previous file with comments | « base/debug/trace_event.h ('k') | base/debug/trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698