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

Unified Diff: content/browser/trace_message_filter.cc

Issue 11411118: Add tracing support to NaCl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unify ppapi_trace_message_filter and child_trace_message_filter Created 8 years 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/trace_message_filter.cc
diff --git a/content/browser/trace_message_filter.cc b/content/browser/trace_message_filter.cc
index 65bc842f55494bbaac19dfcc007317cfaf09e3a8..a2586a1bcbc18ebf4fb549d561fa4bb67de6fa7c 100644
--- a/content/browser/trace_message_filter.cc
+++ b/content/browser/trace_message_filter.cc
@@ -5,7 +5,7 @@
#include "content/browser/trace_message_filter.h"
#include "content/browser/trace_controller_impl.h"
-#include "content/common/child_process_messages.h"
+#include "content/components/tracing/tracing_messages.h"
namespace content {
@@ -40,14 +40,14 @@ bool TraceMessageFilter::OnMessageReceived(const IPC::Message& message,
// Always on IO thread (BrowserMessageFilter guarantee).
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_EX(TraceMessageFilter, message, *message_was_ok)
- IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ChildSupportsTracing,
+ IPC_MESSAGE_HANDLER(TracingHostMsg_ChildSupportsTracing,
OnChildSupportsTracing)
- IPC_MESSAGE_HANDLER(ChildProcessHostMsg_EndTracingAck, OnEndTracingAck)
- IPC_MESSAGE_HANDLER(ChildProcessHostMsg_TraceDataCollected,
+ IPC_MESSAGE_HANDLER(TracingHostMsg_EndTracingAck, OnEndTracingAck)
+ IPC_MESSAGE_HANDLER(TracingHostMsg_TraceDataCollected,
OnTraceDataCollected)
- IPC_MESSAGE_HANDLER(ChildProcessHostMsg_TraceNotification,
+ IPC_MESSAGE_HANDLER(TracingHostMsg_TraceNotification,
OnTraceNotification)
- IPC_MESSAGE_HANDLER(ChildProcessHostMsg_TraceBufferPercentFullReply,
+ IPC_MESSAGE_HANDLER(TracingHostMsg_TraceBufferPercentFullReply,
OnTraceBufferPercentFullReply)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
@@ -58,31 +58,32 @@ void TraceMessageFilter::SendBeginTracing(
const std::vector<std::string>& included_categories,
const std::vector<std::string>& excluded_categories) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- Send(new ChildProcessMsg_BeginTracing(included_categories,
- excluded_categories));
+ Send(new TracingMsg_BeginTracing(included_categories,
+ excluded_categories,
+ base::TimeTicks::NowFromSystemTraceTime()));
}
void TraceMessageFilter::SendEndTracing() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!is_awaiting_end_ack_);
is_awaiting_end_ack_ = true;
- Send(new ChildProcessMsg_EndTracing);
+ Send(new TracingMsg_EndTracing);
}
void TraceMessageFilter::SendGetTraceBufferPercentFull() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!is_awaiting_buffer_percent_full_ack_);
is_awaiting_buffer_percent_full_ack_ = true;
- Send(new ChildProcessMsg_GetTraceBufferPercentFull);
+ Send(new TracingMsg_GetTraceBufferPercentFull);
}
void TraceMessageFilter::SendSetWatchEvent(const std::string& category_name,
const std::string& event_name) {
- Send(new ChildProcessMsg_SetWatchEvent(category_name, event_name));
+ Send(new TracingMsg_SetWatchEvent(category_name, event_name));
}
void TraceMessageFilter::SendCancelWatchEvent() {
- Send(new ChildProcessMsg_CancelWatchEvent);
+ Send(new TracingMsg_CancelWatchEvent);
}
TraceMessageFilter::~TraceMessageFilter() {}

Powered by Google App Engine
This is Rietveld 408576698