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

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

Issue 9348028: Revert 120789 - Propogate status setting for profiler to track parents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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/profiler_controller_impl.h ('k') | content/browser/profiler_message_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2012 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/browser/profiler_controller_impl.h" 5 #include "content/browser/profiler_controller_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "content/common/child_process_messages.h" 9 #include "content/common/child_process_messages.h"
10 #include "content/public/browser/browser_child_process_host_iterator.h" 10 #include "content/public/browser/browser_child_process_host_iterator.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 OnPendingProcesses(sequence_number, pending_processes, false); 114 OnPendingProcesses(sequence_number, pending_processes, false);
115 115
116 BrowserThread::PostTask( 116 BrowserThread::PostTask(
117 BrowserThread::IO, 117 BrowserThread::IO,
118 FROM_HERE, 118 FROM_HERE,
119 base::Bind(&ProfilerControllerImpl::GetProfilerDataFromChildProcesses, 119 base::Bind(&ProfilerControllerImpl::GetProfilerDataFromChildProcesses,
120 base::Unretained(this), 120 base::Unretained(this),
121 sequence_number)); 121 sequence_number));
122 } 122 }
123 123
124 void ProfilerControllerImpl::SetProfilerStatusInChildProcesses( 124 void ProfilerControllerImpl::SetProfilerStatusInChildProcesses(bool enable) {
125 tracked_objects::ThreadData::Status status) {
126 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 125 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
127 126
128 for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) 127 for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter)
129 iter.Send(new ChildProcessMsg_SetProfilerStatus(status)); 128 iter.Send(new ChildProcessMsg_SetProfilerStatus(enable));
130 } 129 }
131 130
132 void ProfilerControllerImpl::SetProfilerStatus( 131 void ProfilerControllerImpl::SetProfilerStatus(bool enable) {
133 tracked_objects::ThreadData::Status status) {
134 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 132 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
135 133
136 BrowserThread::PostTask( 134 BrowserThread::PostTask(
137 BrowserThread::IO, 135 BrowserThread::IO,
138 FROM_HERE, 136 FROM_HERE,
139 base::Bind(&ProfilerControllerImpl::SetProfilerStatusInChildProcesses, 137 base::Bind(&ProfilerControllerImpl::SetProfilerStatusInChildProcesses,
140 base::Unretained(this), 138 base::Unretained(this),
141 status)); 139 enable));
142 140
143 for (content::RenderProcessHost::iterator it( 141 for (content::RenderProcessHost::iterator it(
144 content::RenderProcessHost::AllHostsIterator()); 142 content::RenderProcessHost::AllHostsIterator());
145 !it.IsAtEnd(); it.Advance()) { 143 !it.IsAtEnd(); it.Advance()) {
146 it.GetCurrentValue()->Send(new ChildProcessMsg_SetProfilerStatus(status)); 144 it.GetCurrentValue()->Send(new ChildProcessMsg_SetProfilerStatus(enable));
147 } 145 }
148 } 146 }
149 } // namespace content 147 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/profiler_controller_impl.h ('k') | content/browser/profiler_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698