diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-02 18:11:09 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-02 18:11:09 +0000 |
commit | bfe4c158cd0372fa7a602997f65b42a92645aaf3 (patch) | |
tree | dbda26fa776eb9c3b5fcca2e1b1fa956db1985e8 /chrome/browser/renderer_host/render_process_host.cc | |
parent | 5fa6d7fa100a6836cc7b791a094468f8c384807b (diff) | |
download | chromium_src-bfe4c158cd0372fa7a602997f65b42a92645aaf3.zip chromium_src-bfe4c158cd0372fa7a602997f65b42a92645aaf3.tar.gz chromium_src-bfe4c158cd0372fa7a602997f65b42a92645aaf3.tar.bz2 |
Any time we are shutting down a tab, try to use fast shutdown.
BUG=http://crbug.com/5638
TEST=existing tab strip model tests, Fast shutdown ui tests, new tab strip model fast shutdown test
Review URL: http://codereview.chromium.org/235050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27865 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_process_host.cc')
-rw-r--r-- | chrome/browser/renderer_host/render_process_host.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_process_host.cc b/chrome/browser/renderer_host/render_process_host.cc index 1dd4ec4..0844192 100644 --- a/chrome/browser/renderer_host/render_process_host.cc +++ b/chrome/browser/renderer_host/render_process_host.cc @@ -78,6 +78,7 @@ bool RenderProcessHost::run_renderer_in_process_ = false; RenderProcessHost::RenderProcessHost(Profile* profile) : max_page_id_(-1), + fast_shutdown_started_(false), id_(ChildProcessInfo::GenerateChildProcessUniqueId()), profile_(profile), sudden_termination_allowed_(true), @@ -120,6 +121,12 @@ void RenderProcessHost::UpdateMaxPageID(int32 page_id) { max_page_id_ = page_id; } +bool RenderProcessHost::FastShutdownForPageCount(size_t count) { + if (listeners_.size() == count) + return FastShutdownIfPossible(); + return false; +} + // static RenderProcessHost::iterator RenderProcessHost::AllHostsIterator() { return iterator(&all_hosts); |