diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-13 23:16:42 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-13 23:16:42 +0000 |
commit | a436d92d5121ebfc9996682cfed4c3ad33313138 (patch) | |
tree | 55c32ef45ccc9e808e98074b5a26565239ed06fc /chrome/browser/browser.cc | |
parent | b2ca508afc56d4b7f6d5b036dd721604440210b3 (diff) | |
download | chromium_src-a436d92d5121ebfc9996682cfed4c3ad33313138.zip chromium_src-a436d92d5121ebfc9996682cfed4c3ad33313138.tar.gz chromium_src-a436d92d5121ebfc9996682cfed4c3ad33313138.tar.bz2 |
Have ChildProcessInfo contain a list of all running child processes (i.e. instead of Service and other child process service maintain it). In a future change I'll start moving some of the code from PluginProcessHost to ChildProcessInfo.
Review URL: http://codereview.chromium.org/24017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9804 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 440c959..222fab2 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -23,6 +23,7 @@ #include "chrome/browser/tab_contents/site_instance.h" #include "chrome/browser/tab_contents/tab_contents_type.h" #include "chrome/browser/tab_contents/web_contents.h" +#include "chrome/common/child_process_info.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/l10n_util.h" @@ -59,8 +60,6 @@ #include "chrome/browser/history_tab_ui.h" #include "chrome/browser/options_window.h" #include "chrome/browser/net/url_fixer_upper.h" -#include "chrome/browser/plugin_process_host.h" -#include "chrome/browser/plugin_service.h" #include "chrome/browser/ssl/ssl_error_info.h" #include "chrome/browser/status_bubble.h" #include "chrome/browser/tab_contents/interstitial_page.h" @@ -92,15 +91,15 @@ static const int kWindowTilePixels = 20; /////////////////////////////////////////////////////////////////////////////// -// A task to reduce the working set of the plugins. -class ReducePluginsWorkingSetTask : public Task { +// A task to reduce the working set of the child processes that live on the IO +// thread (i.e. plugins, workers). +class ReduceChildProcessesWorkingSetTask : public Task { public: virtual void Run() { #if defined(OS_WIN) - for (PluginProcessHostIterator iter; !iter.Done(); ++iter) { - ChildProcessInfo* child = const_cast<PluginProcessHost*>(*iter); - DCHECK(child->process().handle()); - child->process().ReduceWorkingSet(); + for (ChildProcessInfo::Iterator iter; !iter.Done(); ++iter) { + DCHECK(iter->process().handle()); + iter->process().ReduceWorkingSet(); } #endif } @@ -132,11 +131,10 @@ class BrowserIdleTimer : public base::IdleTimer { process.ReduceWorkingSet(); } - // Handle the Plugin(s). We need to iterate through the plugin processes - // on the IO thread because that thread manages the plugin process - // collection. + // Handle the child processe. We need to iterate through them on the IO + // thread because that thread manages the child process collection. g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, - new ReducePluginsWorkingSetTask()); + new ReduceChildProcessesWorkingSetTask()); #endif } }; |