Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: chrome/browser/renderer_host/render_process_host.cc

Issue 2928004: Add unit test and supporting code to test process overflow case. (Closed)
Patch Set: linux compile error Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/renderer_host/render_process_host.h ('k') | chrome/browser/renderer_host/site_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_process_host.cc
diff --git a/chrome/browser/renderer_host/render_process_host.cc b/chrome/browser/renderer_host/render_process_host.cc
index 5f9363e643ce4bff8c76fe877110ff2bf8e82693..959252efd9fcd189a90d74d5d133595f46d723d5 100644
--- a/chrome/browser/renderer_host/render_process_host.cc
+++ b/chrome/browser/renderer_host/render_process_host.cc
@@ -13,7 +13,12 @@
namespace {
+size_t max_renderer_count_override = 0;
+
size_t GetMaxRendererProcessCount() {
+ if (max_renderer_count_override)
+ return max_renderer_count_override;
+
// Defines the maximum number of renderer processes according to the
// amount of installed memory as reported by the OS. The table
// values are calculated by assuming that you want the renderers to
@@ -74,8 +79,14 @@ IDMap<RenderProcessHost> all_hosts;
} // namespace
+// static
bool RenderProcessHost::run_renderer_in_process_ = false;
+// static
+void RenderProcessHost::SetMaxRendererProcessCount(size_t count) {
+ max_renderer_count_override = count;
+}
+
RenderProcessHost::RenderProcessHost(Profile* profile)
: max_page_id_(-1),
fast_shutdown_started_(false),
« no previous file with comments | « chrome/browser/renderer_host/render_process_host.h ('k') | chrome/browser/renderer_host/site_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698