Index: headless/lib/headless_content_main_delegate.cc |
diff --git a/headless/lib/headless_content_main_delegate.cc b/headless/lib/headless_content_main_delegate.cc |
index 97d04130d775c600260681e950beeeec0d531f50..e75ad458432ead080d9af2726707370ce6a21108 100644 |
--- a/headless/lib/headless_content_main_delegate.cc |
+++ b/headless/lib/headless_content_main_delegate.cc |
@@ -44,6 +44,9 @@ bool HeadlessContentMainDelegate::BasicStartupComplete(int* exit_code) { |
if (browser_->options()->single_process_mode) |
command_line->AppendSwitch(switches::kSingleProcess); |
+ if (browser_->options()->disable_sandbox) |
+ command_line->AppendSwitch(switches::kNoSandbox); |
+ |
// The headless backend is automatically chosen for a headless build, but also |
// adding it here allows us to run in a non-headless build too. |
command_line->AppendSwitchASCII(switches::kOzonePlatform, "headless"); |