| 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..c231a848f9d1d6c67d12ee9e3350194dbf5487a4 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 || command_line_renderer_limit == 0) {
|
| // 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);
|
|
|