OLD | NEW |
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 "base/process_util.h" | 8 #include "base/process_util.h" |
9 #include "content/browser/profiler_controller_impl.h" | 9 #include "content/browser/profiler_controller_impl.h" |
10 #include "content/browser/tcmalloc_internals_request_job.h" | 10 #include "content/browser/tcmalloc_internals_request_job.h" |
11 #include "content/common/child_process_messages.h" | 11 #include "content/common/child_process_messages.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 ProfilerMessageFilter::ProfilerMessageFilter(ProcessType process_type) | 15 ProfilerMessageFilter::ProfilerMessageFilter(int process_type) |
16 : process_type_(process_type) { | 16 : process_type_(process_type) { |
17 } | 17 } |
18 | 18 |
19 void ProfilerMessageFilter::OnChannelConnected(int32 peer_pid) { | 19 void ProfilerMessageFilter::OnChannelConnected(int32 peer_pid) { |
20 BrowserMessageFilter::OnChannelConnected(peer_pid); | 20 BrowserMessageFilter::OnChannelConnected(peer_pid); |
21 | 21 |
22 tracked_objects::ThreadData::Status status = | 22 tracked_objects::ThreadData::Status status = |
23 tracked_objects::ThreadData::status(); | 23 tracked_objects::ThreadData::status(); |
24 Send(new ChildProcessMsg_SetProfilerStatus(status)); | 24 Send(new ChildProcessMsg_SetProfilerStatus(status)); |
25 } | 25 } |
(...skipping 22 matching lines...) Expand all Loading... |
48 } | 48 } |
49 | 49 |
50 #if defined(USE_TCMALLOC) | 50 #if defined(USE_TCMALLOC) |
51 void ProfilerMessageFilter::OnTcmallocStats(const std::string& output) { | 51 void ProfilerMessageFilter::OnTcmallocStats(const std::string& output) { |
52 AboutTcmallocOutputs::GetInstance()->OnStatsForChildProcess( | 52 AboutTcmallocOutputs::GetInstance()->OnStatsForChildProcess( |
53 base::GetProcId(peer_handle()), process_type_, output); | 53 base::GetProcId(peer_handle()), process_type_, output); |
54 } | 54 } |
55 #endif | 55 #endif |
56 | 56 |
57 } | 57 } |
OLD | NEW |