From 0615b6f5682896d3109349f1857839731e87e672 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Tue, 18 Aug 2009 14:49:26 +0000 Subject: Remove RenderProcessHost::size(). With Pawel's change, size() isn't necessarily correct, and it was badly named and needed fixing anyway. This patch just removes it. There were a few debugging places that used it which I just removed, since I think they're old and haven't been useful lately. The non-trivial changes were in the histogram code, it now counts them slightly differently. Review URL: http://codereview.chromium.org/171051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23622 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_shutdown.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'chrome/browser/browser_shutdown.cc') diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index 7849aa4..ed7a922 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc @@ -59,25 +59,22 @@ void OnShutdownStarting(ShutdownType type) { // since we can't safely count the number of plugin processes from this // thread, and we'd really like to avoid anything which might add further // delays to shutdown time. - shutdown_num_processes_ = static_cast(RenderProcessHost::size()); shutdown_started_ = Time::Now(); // Call FastShutdown on all of the RenderProcessHosts. This will be // a no-op in some cases, so we still need to go through the normal // shutdown path for the ones that didn't exit here. + shutdown_num_processes_ = 0; shutdown_num_processes_slow_ = 0; - size_t start_rph_size = RenderProcessHost::size(); RenderProcessHost::iterator hosts(RenderProcessHost::AllHostsIterator()); while (!hosts.IsAtEnd()) { + shutdown_num_processes_++; if (!hosts.GetCurrentValue()->FastShutdownIfPossible()) { // TODO(ojan): I think now that we deal with beforeunload/unload // higher up, it's not possible to get here. Confirm this and change // FastShutdownIfPossible to just be FastShutdown. shutdown_num_processes_slow_++; } - // The number of RPHs should not have changed as the result of invoking - // FastShutdownIfPossible. - CHECK(start_rph_size == RenderProcessHost::size()); hosts.Advance(); } -- cgit v1.1