summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager_resource_providers.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-21 20:32:30 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-21 20:32:30 +0000
commitfb1277e8766d447b967cfa959020b14c388e806e (patch)
tree1414679bfc830ff403c90fb1e8aa56a0180b514b /chrome/browser/task_manager_resource_providers.cc
parent51549da314ab40bfce645bb6c5875c4e5ec12f67 (diff)
downloadchromium_src-fb1277e8766d447b967cfa959020b14c388e806e.zip
chromium_src-fb1277e8766d447b967cfa959020b14c388e806e.tar.gz
chromium_src-fb1277e8766d447b967cfa959020b14c388e806e.tar.bz2
Launch all child processes asynchronously so as not to block the IO thread.
BUG=6844, 27935 Review URL: http://codereview.chromium.org/402097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32750 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager_resource_providers.cc')
-rw-r--r--chrome/browser/task_manager_resource_providers.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/task_manager_resource_providers.cc b/chrome/browser/task_manager_resource_providers.cc
index 38d0687..4a3a624 100644
--- a/chrome/browser/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager_resource_providers.cc
@@ -376,13 +376,13 @@ void TaskManagerChildProcessResourceProvider::StartUpdating() {
DCHECK(!updating_);
updating_ = true;
- // Register for notifications to get new plugin processes.
+ // Register for notifications to get new child processes.
registrar_.Add(this, NotificationType::CHILD_PROCESS_HOST_CONNECTED,
NotificationService::AllSources());
registrar_.Add(this, NotificationType::CHILD_PROCESS_HOST_DISCONNECTED,
NotificationService::AllSources());
- // Get the existing plugins
+ // Get the existing child processes.
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
@@ -482,7 +482,9 @@ void TaskManagerChildProcessResourceProvider::AddToTaskManager(
// The ChildProcessInfo::Iterator has to be used from the IO thread.
void TaskManagerChildProcessResourceProvider::RetrieveChildProcessInfo() {
for (ChildProcessHost::Iterator iter; !iter.Done(); ++iter) {
- existing_child_process_info_.push_back(**iter);
+ // Only add processes which are already started, since we need their handle.
+ if ((*iter)->handle() != base::kNullProcessHandle)
+ existing_child_process_info_.push_back(**iter);
}
// Now notify the UI thread that we have retrieved information about child
// processes.