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

Unified Diff: content/browser/profiler_controller_impl.cc

Issue 9150017: Add a Content API around BrowserChildProcessHost, similar to what was done with ChildProcessHost.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix?! Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/ppapi_plugin_process_host.cc ('k') | content/browser/renderer_host/gpu_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/profiler_controller_impl.cc
===================================================================
--- content/browser/profiler_controller_impl.cc (revision 118420)
+++ content/browser/profiler_controller_impl.cc (working copy)
@@ -6,13 +6,15 @@
#include "base/bind.h"
#include "base/values.h"
-#include "content/browser/browser_child_process_host.h"
#include "content/common/child_process_messages.h"
+#include "content/public/browser/browser_child_process_host_iterator.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/child_process_data.h"
#include "content/public/browser/profiler_subscriber.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/process_type.h"
+using content::BrowserChildProcessHostIterator;
using content::BrowserThread;
namespace content {
@@ -73,13 +75,12 @@
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
int pending_processes = 0;
- for (BrowserChildProcessHost::Iterator child_process_host;
- !child_process_host.Done(); ++child_process_host) {
+ for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) {
const std::string process_type =
- content::GetProcessTypeNameInEnglish(child_process_host->data().type);
+ content::GetProcessTypeNameInEnglish(iter.GetData().type);
++pending_processes;
- if (!child_process_host->Send(new ChildProcessMsg_GetChildProfilerData(
- sequence_number, process_type))) {
+ if (!iter.Send(new ChildProcessMsg_GetChildProfilerData(
+ sequence_number, process_type))) {
--pending_processes;
}
}
@@ -123,10 +124,8 @@
void ProfilerControllerImpl::SetProfilerStatusInChildProcesses(bool enable) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- for (BrowserChildProcessHost::Iterator child_process_host;
- !child_process_host.Done(); ++child_process_host) {
- child_process_host->Send(new ChildProcessMsg_SetProfilerStatus(enable));
- }
+ for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter)
+ iter.Send(new ChildProcessMsg_SetProfilerStatus(enable));
}
void ProfilerControllerImpl::SetProfilerStatus(bool enable) {
« no previous file with comments | « content/browser/ppapi_plugin_process_host.cc ('k') | content/browser/renderer_host/gpu_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698