diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 14:49:26 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 14:49:26 +0000 |
commit | 0615b6f5682896d3109349f1857839731e87e672 (patch) | |
tree | 2b16d769e31582be6b2acb7552687166656d842b /chrome/browser/browser_browsertest.cc | |
parent | da4b92fee136f90425c3400c2fe11469972178cf (diff) | |
download | chromium_src-0615b6f5682896d3109349f1857839731e87e672.zip chromium_src-0615b6f5682896d3109349f1857839731e87e672.tar.gz chromium_src-0615b6f5682896d3109349f1857839731e87e672.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/browser_browsertest.cc')
-rw-r--r-- | chrome/browser/browser_browsertest.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/chrome/browser/browser_browsertest.cc b/chrome/browser/browser_browsertest.cc index 0826527..8d5e721 100644 --- a/chrome/browser/browser_browsertest.cc +++ b/chrome/browser/browser_browsertest.cc @@ -35,6 +35,18 @@ std::wstring WindowCaptionFromPageTitle(std::wstring page_title) { #endif } +// Returns the number of active RenderProcessHosts. +int CountRenderProcessHosts() { + int result = 0; + RenderProcessHost::iterator renderer_iter( + RenderProcessHost::AllHostsIterator()); + while (!renderer_iter.IsAtEnd()) { + result++; + renderer_iter.Advance(); + } + return result; +} + } // namespace class BrowserTest : public InProcessBrowserTest { @@ -118,8 +130,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ThirtyFourTabs) { // See browser\renderer_host\render_process_host.cc for the algorithm to // decide how many processes to create. if (base::SysInfo::AmountOfPhysicalMemoryMB() >= 2048) { - EXPECT_GE(RenderProcessHost::size(), 24U); + EXPECT_GE(CountRenderProcessHosts(), 24); } else { - EXPECT_LE(RenderProcessHost::size(), 23U); + EXPECT_LE(CountRenderProcessHosts(), 23); } } |