Chromium Code Reviews| 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 657c8bb7f94ab668879cfa24ea4e67e5378e33f2..3502997adfa93d6e8d702f82c843d5491b8d79a4 100644 |
| --- a/content/browser/renderer_host/render_process_host_impl.cc |
| +++ b/content/browser/renderer_host/render_process_host_impl.cc |
| @@ -201,9 +201,18 @@ 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() { |
| +} // namespace |
| + |
| +// Stores the maximum number of renderer processes the content module can |
| +// create. |
| +static size_t max_renderer_count_override = 0; |
|
jam
2012/02/10 18:02:12
nit: globals should be "g_max_renderer_count_overr
nasko
2012/02/11 00:49:20
Done.
|
| + |
| +// static |
| +size_t content::RenderProcessHost::GetMaxRendererProcessCount() { |
| if (max_renderer_count_override) |
| return max_renderer_count_override; |
| @@ -245,18 +254,11 @@ 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) { |
| +void content::RenderProcessHost::SetMaxRendererProcessCount(size_t count) { |
| max_renderer_count_override = count; |
| } |