| Index: content/browser/renderer_host/render_process_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
| index ce2d6999dd82a5e9cacfb1174e6541653307a13f..3be1b2f3b82f3db60c7ef22901202576ca1857c6 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -202,11 +202,20 @@ class RendererURLRequestContextSelector
|
| scoped_refptr<net::URLRequestContextGetter> media_request_context_;
|
| };
|
|
|
| -size_t max_renderer_count_override = 0;
|
| +// the global list of all renderer processes
|
| +base::LazyInstance<IDMap<content::RenderProcessHost> >::Leaky
|
| + g_all_hosts = LAZY_INSTANCE_INITIALIZER;
|
|
|
| -size_t GetMaxRendererProcessCount() {
|
| - if (max_renderer_count_override)
|
| - return max_renderer_count_override;
|
| +} // namespace
|
| +
|
| +// Stores the maximum number of renderer processes the content module can
|
| +// create.
|
| +static size_t g_max_renderer_count_override = 0;
|
| +
|
| +// static
|
| +size_t content::RenderProcessHost::GetMaxRendererProcessCount() {
|
| + if (g_max_renderer_count_override)
|
| + return g_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
|
| @@ -246,19 +255,12 @@ size_t GetMaxRendererProcessCount() {
|
| return max_count;
|
| }
|
|
|
| -// the global list of all renderer processes
|
| -base::LazyInstance<IDMap<content::RenderProcessHost> >::Leaky
|
| - g_all_hosts = LAZY_INSTANCE_INITIALIZER;
|
| -
|
| -} // namespace
|
| -
|
| // static
|
| bool g_run_renderer_in_process_ = false;
|
|
|
| // static
|
| -void content::RenderProcessHost::SetMaxRendererProcessCountForTest(
|
| - size_t count) {
|
| - max_renderer_count_override = count;
|
| +void content::RenderProcessHost::SetMaxRendererProcessCount(size_t count) {
|
| + g_max_renderer_count_override = count;
|
| }
|
|
|
| RenderProcessHostImpl::RenderProcessHostImpl(
|
|
|