| 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/child/child_thread_impl.h" | 5 #include "content/child/child_thread_impl.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 #endif // IPC_MESSAGE_LOG_ENABLED | 645 #endif // IPC_MESSAGE_LOG_ENABLED |
| 646 | 646 |
| 647 void ChildThreadImpl::OnSetProfilerStatus(ThreadData::Status status) { | 647 void ChildThreadImpl::OnSetProfilerStatus(ThreadData::Status status) { |
| 648 ThreadData::InitializeAndSetTrackingStatus(status); | 648 ThreadData::InitializeAndSetTrackingStatus(status); |
| 649 } | 649 } |
| 650 | 650 |
| 651 void ChildThreadImpl::OnGetChildProfilerData(int sequence_number) { | 651 void ChildThreadImpl::OnGetChildProfilerData(int sequence_number) { |
| 652 tracked_objects::ProcessDataSnapshot process_data; | 652 tracked_objects::ProcessDataSnapshot process_data; |
| 653 ThreadData::Snapshot(&process_data); | 653 ThreadData::Snapshot(&process_data); |
| 654 | 654 |
| 655 Send(new ChildProcessHostMsg_ChildProfilerData(sequence_number, | 655 Send( |
| 656 process_data)); | 656 new ChildProcessHostMsg_ChildProfilerData(sequence_number, process_data)); |
| 657 } | 657 } |
| 658 | 658 |
| 659 void ChildThreadImpl::OnDumpHandles() { | 659 void ChildThreadImpl::OnDumpHandles() { |
| 660 #if defined(OS_WIN) | 660 #if defined(OS_WIN) |
| 661 scoped_refptr<HandleEnumerator> handle_enum( | 661 scoped_refptr<HandleEnumerator> handle_enum( |
| 662 new HandleEnumerator( | 662 new HandleEnumerator( |
| 663 base::CommandLine::ForCurrentProcess()->HasSwitch( | 663 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 664 switches::kAuditAllHandles))); | 664 switches::kAuditAllHandles))); |
| 665 handle_enum->EnumerateHandles(); | 665 handle_enum->EnumerateHandles(); |
| 666 Send(new ChildProcessHostMsg_DumpHandlesDone); | 666 Send(new ChildProcessHostMsg_DumpHandlesDone); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 // doesn't cause such issues. TODO(gab): Remove this once the experiment is | 749 // doesn't cause such issues. TODO(gab): Remove this once the experiment is |
| 750 // over (http://crbug.com/458594). | 750 // over (http://crbug.com/458594). |
| 751 base::FieldTrial* trial = | 751 base::FieldTrial* trial = |
| 752 base::FieldTrialList::Find("BackgroundRendererProcesses"); | 752 base::FieldTrialList::Find("BackgroundRendererProcesses"); |
| 753 if (trial && trial->group_name() == "AllowBackgroundModeFromRenderer") | 753 if (trial && trial->group_name() == "AllowBackgroundModeFromRenderer") |
| 754 base::Process::Current().SetProcessBackgrounded(background); | 754 base::Process::Current().SetProcessBackgrounded(background); |
| 755 #endif // OS_WIN | 755 #endif // OS_WIN |
| 756 } | 756 } |
| 757 | 757 |
| 758 } // namespace content | 758 } // namespace content |
| OLD | NEW |