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

Side by Side Diff: content/browser/profiler_message_filter.cc

Issue 24514003: Make BrowserMessageFilter not derive from IPC::ChannelProxy::MessageFilter. This allows us to hide … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/ppapi_plugin_process_host.cc ('k') | content/browser/renderer_host/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/profiler_message_filter.h" 5 #include "content/browser/profiler_message_filter.h"
6 6
7 #include "base/tracked_objects.h" 7 #include "base/tracked_objects.h"
8 #include "content/browser/profiler_controller_impl.h" 8 #include "content/browser/profiler_controller_impl.h"
9 #include "content/browser/tcmalloc_internals_request_job.h" 9 #include "content/browser/tcmalloc_internals_request_job.h"
10 #include "content/common/child_process_messages.h" 10 #include "content/common/child_process_messages.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 ProfilerMessageFilter::ProfilerMessageFilter(int process_type) 14 ProfilerMessageFilter::ProfilerMessageFilter(int process_type)
15 : process_type_(process_type) { 15 : process_type_(process_type) {
16 } 16 }
17 17
18 void ProfilerMessageFilter::OnChannelConnected(int32 peer_pid) { 18 void ProfilerMessageFilter::OnChannelConnected(int32 peer_pid) {
19 BrowserMessageFilter::OnChannelConnected(peer_pid);
20
21 tracked_objects::ThreadData::Status status = 19 tracked_objects::ThreadData::Status status =
22 tracked_objects::ThreadData::status(); 20 tracked_objects::ThreadData::status();
23 Send(new ChildProcessMsg_SetProfilerStatus(status)); 21 Send(new ChildProcessMsg_SetProfilerStatus(status));
24 } 22 }
25 23
26 bool ProfilerMessageFilter::OnMessageReceived(const IPC::Message& message, 24 bool ProfilerMessageFilter::OnMessageReceived(const IPC::Message& message,
27 bool* message_was_ok) { 25 bool* message_was_ok) {
28 bool handled = true; 26 bool handled = true;
29 IPC_BEGIN_MESSAGE_MAP_EX(ProfilerMessageFilter, message, *message_was_ok) 27 IPC_BEGIN_MESSAGE_MAP_EX(ProfilerMessageFilter, message, *message_was_ok)
30 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ChildProfilerData, 28 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ChildProfilerData,
(...skipping 16 matching lines...) Expand all
47 } 45 }
48 46
49 #if defined(USE_TCMALLOC) 47 #if defined(USE_TCMALLOC)
50 void ProfilerMessageFilter::OnTcmallocStats(const std::string& output) { 48 void ProfilerMessageFilter::OnTcmallocStats(const std::string& output) {
51 AboutTcmallocOutputs::GetInstance()->OnStatsForChildProcess( 49 AboutTcmallocOutputs::GetInstance()->OnStatsForChildProcess(
52 peer_pid(), process_type_, output); 50 peer_pid(), process_type_, output);
53 } 51 }
54 #endif 52 #endif
55 53
56 } 54 }
OLDNEW
« no previous file with comments | « content/browser/ppapi_plugin_process_host.cc ('k') | content/browser/renderer_host/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698