summaryrefslogtreecommitdiffstats
path: root/components/tracing
diff options
context:
space:
mode:
authorrubentopo@gmail.com <rubentopo@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 08:49:03 +0000
committerrubentopo@gmail.com <rubentopo@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 08:49:03 +0000
commitd936677a24d0a18fc35935a999b066496f9a6ec7 (patch)
tree8943336492769d04e1cbe806b49912d32f485b8a /components/tracing
parentdf9416c847ceefdb4d1749cfd53866775f9a6535 (diff)
downloadchromium_src-d936677a24d0a18fc35935a999b066496f9a6ec7.zip
chromium_src-d936677a24d0a18fc35935a999b066496f9a6ec7.tar.gz
chromium_src-d936677a24d0a18fc35935a999b066496f9a6ec7.tar.bz2
Category group support/Renamings.
Related review: https://codereview.chromium.org/11823016/ BUG=168284 TEST=TraceEventTestFixture.Categories, TraceEventTestFixture.CategoryFilter R=nduca Review URL: https://chromiumcodereview.appspot.com/12150004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/tracing')
-rw-r--r--components/tracing/child_trace_message_filter.cc12
-rw-r--r--components/tracing/child_trace_message_filter.h3
-rw-r--r--components/tracing/tracing_messages.h5
3 files changed, 8 insertions, 12 deletions
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc
index 1b001a7..c8d3147 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -46,8 +46,7 @@ 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,
+ const std::string& category_filter_str,
base::TimeTicks browser_time,
int options) {
#if defined(__native_client__)
@@ -59,8 +58,7 @@ void ChildTraceMessageFilter::OnBeginTracing(
TraceLog::GetInstance()->SetTimeOffset(time_offset);
#endif
TraceLog::GetInstance()->SetEnabled(
- included_categories,
- excluded_categories,
+ base::debug::CategoryFilter(category_filter_str),
static_cast<base::debug::TraceLog::Options>(options));
}
@@ -74,9 +72,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()->GetKnownCategoryGroups(&category_groups);
+ channel_->Send(new TracingHostMsg_EndTracingAck(category_groups));
}
void ChildTraceMessageFilter::OnGetTraceBufferPercentFull() {
diff --git a/components/tracing/child_trace_message_filter.h b/components/tracing/child_trace_message_filter.h
index 7d85627..9f3f03a 100644
--- a/components/tracing/child_trace_message_filter.h
+++ b/components/tracing/child_trace_message_filter.h
@@ -28,8 +28,7 @@ class ChildTraceMessageFilter : public IPC::ChannelProxy::MessageFilter {
private:
// Message handlers.
- void OnBeginTracing(const std::vector<std::string>& included_categories,
- const std::vector<std::string>& excluded_categories,
+ void OnBeginTracing(const std::string& category_filter_str,
base::TimeTicks browser_time,
int mode);
void OnEndTracing();
diff --git a/components/tracing/tracing_messages.h b/components/tracing/tracing_messages.h
index fd15c21..9beb7e1 100644
--- a/components/tracing/tracing_messages.h
+++ b/components/tracing/tracing_messages.h
@@ -16,9 +16,8 @@
#define IPC_MESSAGE_START TracingMsgStart
// Sent to all child processes to enable trace event recording.
-IPC_MESSAGE_CONTROL4(TracingMsg_BeginTracing,
- std::vector<std::string> /* included_categories */,
- std::vector<std::string> /* excluded_categories */,
+IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing,
+ std::string /* category_filter_str */,
base::TimeTicks /* browser_time */,
int /* base::debug::TraceLog::Options */)