OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/common/child_thread.h" | 5 #include "content/common/child_thread.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/process.h" | 9 #include "base/process.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 #endif // IPC_MESSAGE_LOG_ENABLED | 225 #endif // IPC_MESSAGE_LOG_ENABLED |
226 | 226 |
227 void ChildThread::OnSetProfilerStatus(bool enable) { | 227 void ChildThread::OnSetProfilerStatus(bool enable) { |
228 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enable); | 228 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enable); |
229 } | 229 } |
230 | 230 |
231 void ChildThread::OnGetChildProfilerData( | 231 void ChildThread::OnGetChildProfilerData( |
232 int sequence_number, | 232 int sequence_number, |
233 const std::string& process_type) { | 233 const std::string& process_type) { |
234 scoped_ptr<base::DictionaryValue> value( | 234 scoped_ptr<base::DictionaryValue> value( |
235 tracked_objects::ThreadData::ToValue()); | 235 tracked_objects::ThreadData::ToValue(false)); |
236 value->SetString("process_type", process_type); | 236 value->SetString("process_type", process_type); |
237 value->SetInteger("process_id", base::GetCurrentProcId()); | 237 value->SetInteger("process_id", base::GetCurrentProcId()); |
238 | 238 |
239 Send(new ChildProcessHostMsg_ChildProfilerData( | 239 Send(new ChildProcessHostMsg_ChildProfilerData( |
240 sequence_number, *value.get())); | 240 sequence_number, *value.get())); |
241 } | 241 } |
242 | 242 |
243 void ChildThread::OnDumpHandles() { | 243 void ChildThread::OnDumpHandles() { |
244 #if defined(OS_WIN) | 244 #if defined(OS_WIN) |
245 scoped_refptr<content::HandleEnumerator> handle_enum( | 245 scoped_refptr<content::HandleEnumerator> handle_enum( |
(...skipping 17 matching lines...) Expand all Loading... |
263 MessageLoop::current()->Quit(); | 263 MessageLoop::current()->Quit(); |
264 return; | 264 return; |
265 } | 265 } |
266 | 266 |
267 // The child process shutdown sequence is a request response based mechanism, | 267 // The child process shutdown sequence is a request response based mechanism, |
268 // where we send out an initial feeler request to the child process host | 268 // where we send out an initial feeler request to the child process host |
269 // instance in the browser to verify if it's ok to shutdown the child process. | 269 // instance in the browser to verify if it's ok to shutdown the child process. |
270 // The browser then sends back a response if it's ok to shutdown. | 270 // The browser then sends back a response if it's ok to shutdown. |
271 Send(new ChildProcessHostMsg_ShutdownRequest); | 271 Send(new ChildProcessHostMsg_ShutdownRequest); |
272 } | 272 } |
OLD | NEW |