kNoSandbox moved into service_manager

This commit is contained in:
Jeremy Apthorp 2018-09-14 17:07:49 -07:00 committed by Aleksei Kuzmin
parent ce2c8e358d
commit 7092fa31a4
3 changed files with 6 additions and 4 deletions

View file

@ -145,7 +145,7 @@ void AtomMainDelegate::PreSandboxStartup() {
service_manager::switches::kDisableSetuidSandbox);
} else {
// Disable renderer sandbox for most of node's functions.
command_line->AppendSwitch(::switches::kNoSandbox);
command_line->AppendSwitch(service_manager::switches::kNoSandbox);
}
}
@ -168,7 +168,7 @@ AtomMainDelegate::CreateContentRendererClient() {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableSandbox) ||
!base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kNoSandbox)) {
service_manager::switches::kNoSandbox)) {
renderer_client_.reset(new AtomSandboxedRendererClient);
} else {
renderer_client_.reset(new AtomRendererClient);

View file

@ -50,6 +50,7 @@
#include "net/ssl/client_cert_identity.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/service_manager/sandbox/switches.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
@ -1188,7 +1189,7 @@ void App::EnableMixedSandbox(mate::Arguments* args) {
}
auto* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(::switches::kNoSandbox)) {
if (command_line->HasSwitch(service_manager::switches::kNoSandbox)) {
#if defined(OS_WIN)
const base::CommandLine::CharType* noSandboxArg = L"--no-sandbox";
#else

View file

@ -24,6 +24,7 @@
#include "content/public/common/web_preferences.h"
#include "native_mate/dictionary.h"
#include "net/base/filename_util.h"
#include "services/service_manager/sandbox/switches.h"
#if defined(OS_WIN)
#include "ui/gfx/switches.h"
@ -245,7 +246,7 @@ void WebContentsPreferences::AppendCommandLineSwitches(
if (IsEnabled(options::kSandbox))
command_line->AppendSwitch(switches::kEnableSandbox);
else if (!command_line->HasSwitch(switches::kEnableSandbox))
command_line->AppendSwitch(::switches::kNoSandbox);
command_line->AppendSwitch(service_manager::switches::kNoSandbox);
// Check if nativeWindowOpen is enabled.
if (IsEnabled(options::kNativeWindowOpen))