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

Unified Diff: components/tracing/child_trace_message_filter.cc

Issue 11823016: Trace category groups and category filter. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Category group and category filter basics. Created 7 years, 10 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: components/tracing/child_trace_message_filter.cc
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc
index 161c778c450ff827243d70cbecc4002ca4c6fd55..d1c782a9396b279d8bf2ef9829d4527a6b25f342 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -46,9 +46,8 @@ bool ChildTraceMessageFilter::OnMessageReceived(const IPC::Message& message) {
ChildTraceMessageFilter::~ChildTraceMessageFilter() {}
void ChildTraceMessageFilter::OnBeginTracing(
- const std::vector<std::string>& included_categories,
- const std::vector<std::string>& excluded_categories,
- base::TimeTicks browser_time) {
+ std::string category_filter_str,
+ base::TimeTicks browser_time) {
#if defined(__native_client__)
// NaCl and system times are offset by a bit, so subtract some time from
// the captured timestamps. The value might be off by a bit due to messaging
@@ -57,8 +56,8 @@ void ChildTraceMessageFilter::OnBeginTracing(
browser_time;
TraceLog::GetInstance()->SetTimeOffset(time_offset);
#endif
- TraceLog::GetInstance()->SetEnabled(included_categories,
- excluded_categories);
+ base::debug::CategoryFilter category_filter(category_filter_str);
+ TraceLog::GetInstance()->SetEnabled(category_filter);
}
void ChildTraceMessageFilter::OnEndTracing() {
@@ -71,9 +70,9 @@ void ChildTraceMessageFilter::OnEndTracing() {
TraceLog::GetInstance()->Flush(
base::Bind(&ChildTraceMessageFilter::OnTraceDataCollected, this));
- std::vector<std::string> categories;
- TraceLog::GetInstance()->GetKnownCategories(&categories);
- channel_->Send(new TracingHostMsg_EndTracingAck(categories));
+ std::vector<std::string> category_groups;
+ TraceLog::GetInstance()->GetKnownCategories(&category_groups);
+ channel_->Send(new TracingHostMsg_EndTracingAck(category_groups));
}
void ChildTraceMessageFilter::OnGetTraceBufferPercentFull() {

Powered by Google App Engine
This is Rietveld 408576698