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

Unified Diff: content/browser/tracing/trace_controller_impl.h

Issue 12150004: Category group support/Renamings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed comment, added better support for default filtering, fixed merge issues. Created 7 years, 9 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
Index: content/browser/tracing/trace_controller_impl.h
diff --git a/content/browser/tracing/trace_controller_impl.h b/content/browser/tracing/trace_controller_impl.h
index 165965d818e80d8448993dbd4135c4e67a9a01c3..580d255d808ceaf6e1bc5fd7e2d60f0fb27f6760 100644
--- a/content/browser/tracing/trace_controller_impl.h
+++ b/content/browser/tracing/trace_controller_impl.h
@@ -26,24 +26,14 @@ class TraceControllerImpl : public TraceController {
// startup tracing.
void InitStartupTracing(const CommandLine& command_line);
- // Get set of known categories. This can change as new code paths are reached.
- // If true is returned, subscriber->OnKnownCategoriesCollected will be called
- // once the categories are retrieved from child processes.
- bool GetKnownCategoriesAsync(TraceSubscriber* subscriber);
-
- // Same as above, but specifies which categories to trace.
- // If both included_categories and excluded_categories are empty,
- // all categories are traced.
- // Else if included_categories is non-empty, only those are traced.
- // Else if excluded_categories is non-empty, everything but those are traced.
- bool BeginTracing(TraceSubscriber* subscriber,
- const std::vector<std::string>& included_categories,
- const std::vector<std::string>& excluded_categories,
- base::debug::TraceLog::Options options);
-
- // TraceController implementation:
+ // Get set of known category groups. This can change as new code paths are
+ // reached. If true is returned, subscriber->OnKnownCategoriesCollected will
+ // be called once the category groups are retrieved from child processes.
+ bool GetKnownCategoryGroupsAsync(TraceSubscriber* subscriber);
+
+ // TraceController implementation.
virtual bool BeginTracing(TraceSubscriber* subscriber,
- const std::string& categories,
+ const std::string& category_patterns,
base::debug::TraceLog::Options options) OVERRIDE;
virtual bool EndTracingAsync(TraceSubscriber* subscriber) OVERRIDE;
virtual bool GetTraceBufferPercentFullAsync(
@@ -88,7 +78,7 @@ class TraceControllerImpl : public TraceController {
void AddFilter(TraceMessageFilter* filter);
void RemoveFilter(TraceMessageFilter* filter);
void OnTracingBegan(TraceSubscriber* subscriber);
- void OnEndTracingAck(const std::vector<std::string>& known_categories);
+ void OnEndTracingAck(const std::vector<std::string>& known_category_groups);
void OnTraceDataCollected(
const scoped_refptr<base::RefCountedString>& events_str_ptr);
void OnTraceNotification(int notification);
@@ -102,10 +92,9 @@ class TraceControllerImpl : public TraceController {
int pending_bpf_ack_count_;
float maximum_bpf_;
bool is_tracing_;
- bool is_get_categories_;
- std::set<std::string> known_categories_;
- std::vector<std::string> included_categories_;
- std::vector<std::string> excluded_categories_;
+ bool is_get_category_groups_;
+ std::set<std::string> known_category_groups_;
+ base::debug::CategoryFilter category_filter_;
std::string watch_category_;
std::string watch_name_;
base::debug::TraceLog::Options trace_options_;

Powered by Google App Engine
This is Rietveld 408576698