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

Unified Diff: content/components/tracing/child_trace_message_filter.h

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/components/tracing/child_trace_message_filter.h
diff --git a/content/common/child_trace_message_filter.h b/content/components/tracing/child_trace_message_filter.h
similarity index 71%
rename from content/common/child_trace_message_filter.h
rename to content/components/tracing/child_trace_message_filter.h
index 061a6eb03c65bab40ed352114d4b07adc37d49c6..83a3005ccb0291635d2e0ebf32a8079cbdb55851 100644
--- a/content/common/child_trace_message_filter.h
+++ b/content/components/tracing/child_trace_message_filter.h
@@ -1,51 +1,53 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_COMMON_CHILD_TRACE_MESSAGE_FILTER_H_
-#define CONTENT_COMMON_CHILD_TRACE_MESSAGE_FILTER_H_
-
-#include <string>
-
-#include "base/debug/trace_event.h"
-#include "base/process.h"
-#include "ipc/ipc_channel_proxy.h"
-
-namespace content {
-
-// This class sends and receives trace messages on child processes.
-class ChildTraceMessageFilter : public IPC::ChannelProxy::MessageFilter {
- public:
- ChildTraceMessageFilter();
-
- // IPC::ChannelProxy::MessageFilter implementation.
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
- virtual void OnFilterRemoved() OVERRIDE;
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
-
- protected:
- virtual ~ChildTraceMessageFilter();
-
- private:
- // Message handlers.
- void OnBeginTracing(const std::vector<std::string>& included_categories,
- const std::vector<std::string>& excluded_categories);
- void OnEndTracing();
- void OnGetTraceBufferPercentFull();
- void OnSetWatchEvent(const std::string& category_name,
- const std::string& event_name);
- void OnCancelWatchEvent();
-
- // Callback from trace subsystem.
- void OnTraceDataCollected(
- const scoped_refptr<base::RefCountedString>& events_str_ptr);
- void OnTraceNotification(int notification);
-
- IPC::Channel* channel_;
-
- DISALLOW_COPY_AND_ASSIGN(ChildTraceMessageFilter);
-};
-
-} // namespace content
-
-#endif // CONTENT_COMMON_CHILD_TRACE_MESSAGE_FILTER_H_
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_
+#define CONTENT_COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_
+
+#include "ipc/ipc_channel_proxy.h"
+
+namespace base {
+class MessageLoopProxy;
+}
+
+namespace tracing {
jam 2012/12/06 01:36:16 nit: everything under src/content is in the conten
+
+// This class sends and receives trace messages on child processes.
+class ChildTraceMessageFilter : public IPC::ChannelProxy::MessageFilter {
+ public:
+ ChildTraceMessageFilter(base::MessageLoopProxy* ipc_message_loop);
+
+ // IPC::ChannelProxy::MessageFilter implementation.
+ virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterRemoved() OVERRIDE;
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ protected:
+ virtual ~ChildTraceMessageFilter();
+
+ private:
+ // Message handlers.
+ void OnBeginTracing(const std::vector<std::string>& included_categories,
+ const std::vector<std::string>& excluded_categories,
+ base::TimeTicks browser_time);
+ void OnEndTracing();
+ void OnGetTraceBufferPercentFull();
+ void OnSetWatchEvent(const std::string& category_name,
+ const std::string& event_name);
+ void OnCancelWatchEvent();
+
+ // Callback from trace subsystem.
+ void OnTraceDataCollected(
+ const scoped_refptr<base::RefCountedString>& events_str_ptr);
+ void OnTraceNotification(int notification);
+
+ IPC::Channel* channel_;
+ base::MessageLoopProxy* ipc_message_loop_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChildTraceMessageFilter);
+};
+
+} // namespace tracing
+
+#endif // CONTENT_COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698