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

Side by Side Diff: content/child/child_thread_impl.cc

Issue 985773002: Introducing phased profiling framework (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@write_to_file
Patch Set: Fixing Android compile errors. Created 5 years, 8 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
« no previous file with comments | « content/browser/profiler_message_filter.cc ('k') | content/common/child_process_messages.h » ('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/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
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
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
OLDNEW
« no previous file with comments | « content/browser/profiler_message_filter.cc ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698