Chromium Code Reviews| Index: content/browser/android/content_startup_flags.cc |
| diff --git a/content/browser/android/content_startup_flags.cc b/content/browser/android/content_startup_flags.cc |
| index a771daa81705eba3b53952b3961e1e0754546e6b..933220bcf08ceb2061ed900f107fbf1010009e06 100644 |
| --- a/content/browser/android/content_startup_flags.cc |
| +++ b/content/browser/android/content_startup_flags.cc |
| @@ -18,7 +18,7 @@ |
| namespace content { |
| -void SetContentCommandLineFlags(int max_render_process_count, |
| +void SetContentCommandLineFlags(bool in_process, |
| const std::string& plugin_descriptor) { |
| // May be called multiple times, to cover all possible program entry points. |
| static bool already_initialized = false; |
| @@ -34,9 +34,7 @@ void SetContentCommandLineFlags(int max_render_process_count, |
| switches::kRendererProcessLimit); |
| int value; |
| if (base::StringToInt(limit, &value)) { |
| - command_line_renderer_limit = value; |
| - if (value <= 0) |
| - max_render_process_count = 0; |
| + command_line_renderer_limit = std::max(0, value); |
| } |
| } |
| @@ -44,16 +42,13 @@ void SetContentCommandLineFlags(int max_render_process_count, |
| int limit = std::min(command_line_renderer_limit, |
| static_cast<int>(kMaxRendererProcessCount)); |
| RenderProcessHost::SetMaxRendererProcessCount(limit); |
| - } else if (max_render_process_count <= 0) { |
| + } |
| + |
| + if (in_process) { |
|
klobag.chromium
2014/06/27 16:25:42
hmm what happen is command_line_renderer_limit > 0
ppi
2014/06/27 16:40:32
Nothing in particular. It already can happen - the
ppi
2014/07/16 13:26:54
Oh, I see there is a change in behavior. If both c
|
| // Need to ensure the command line flag is consistent as a lot of chrome |
| // internal code checks this directly, but it wouldn't normally get set when |
| // we are implementing an embedded WebView. |
| parsed_command_line->AppendSwitch(switches::kSingleProcess); |
| - } else { |
| - int default_maximum = RenderProcessHost::GetMaxRendererProcessCount(); |
| - DCHECK(default_maximum <= static_cast<int>(kMaxRendererProcessCount)); |
| - if (max_render_process_count < default_maximum) |
| - RenderProcessHost::SetMaxRendererProcessCount(max_render_process_count); |
| } |
| parsed_command_line->AppendSwitch(switches::kEnableThreadedCompositing); |