Commit 667a479e authored by luken@chromium.org's avatar luken@chromium.org

Remove flag --disable-winsta

BUG=378462

Review URL: https://codereview.chromium.org/301353004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273975 0039d316-1c4b-4281-b951-d872f2087c98
parent bd8f27c7
...@@ -25,11 +25,9 @@ bool InitializeSandbox(sandbox::SandboxInterfaceInfo* sandbox_info) { ...@@ -25,11 +25,9 @@ bool InitializeSandbox(sandbox::SandboxInterfaceInfo* sandbox_info) {
// process to swap its window station. During this time all the UI will be // process to swap its window station. During this time all the UI will be
// broken. This has to run before threads and windows are created. // broken. This has to run before threads and windows are created.
if (!command_line.HasSwitch(switches::kNoSandbox)) { if (!command_line.HasSwitch(switches::kNoSandbox)) {
bool use_winsta = !command_line.HasSwitch(
switches::kDisableAltWinstation);
// Precreate the desktop and window station used by the renderers. // Precreate the desktop and window station used by the renderers.
sandbox::TargetPolicy* policy = broker_services->CreatePolicy(); sandbox::TargetPolicy* policy = broker_services->CreatePolicy();
sandbox::ResultCode result = policy->CreateAlternateDesktop(use_winsta); sandbox::ResultCode result = policy->CreateAlternateDesktop(true);
CHECK(sandbox::SBOX_ERROR_FAILED_TO_SWITCH_BACK_WINSTATION != result); CHECK(sandbox::SBOX_ERROR_FAILED_TO_SWITCH_BACK_WINSTATION != result);
policy->Release(); policy->Release();
} }
......
...@@ -358,10 +358,7 @@ bool AddPolicyForSandboxedProcess(sandbox::TargetPolicy* policy) { ...@@ -358,10 +358,7 @@ bool AddPolicyForSandboxedProcess(sandbox::TargetPolicy* policy) {
// Prevents the renderers from manipulating low-integrity processes. // Prevents the renderers from manipulating low-integrity processes.
policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_UNTRUSTED); policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_UNTRUSTED);
bool use_winsta = !CommandLine::ForCurrentProcess()->HasSwitch( if (sandbox::SBOX_ALL_OK != policy->SetAlternateDesktop(true)) {
switches::kDisableAltWinstation);
if (sandbox::SBOX_ALL_OK != policy->SetAlternateDesktop(use_winsta)) {
DLOG(WARNING) << "Failed to apply desktop security to the renderer"; DLOG(WARNING) << "Failed to apply desktop security to the renderer";
} }
......
...@@ -98,9 +98,6 @@ const char kDisableLayerSquashing[] = ...@@ -98,9 +98,6 @@ const char kDisableLayerSquashing[] =
const char kDisableAcceleratedVideoDecode[] = const char kDisableAcceleratedVideoDecode[] =
"disable-accelerated-video-decode"; "disable-accelerated-video-decode";
// Disables the alternate window station for the renderer.
const char kDisableAltWinstation[] = "disable-winsta";
// Disable the ApplicationCache. // Disable the ApplicationCache.
const char kDisableApplicationCache[] = "disable-application-cache"; const char kDisableApplicationCache[] = "disable-application-cache";
......
...@@ -37,7 +37,6 @@ CONTENT_EXPORT extern const char kDisableAcceleratedFixedRootBackground[]; ...@@ -37,7 +37,6 @@ CONTENT_EXPORT extern const char kDisableAcceleratedFixedRootBackground[];
CONTENT_EXPORT extern const char kDisableAcceleratedOverflowScroll[]; CONTENT_EXPORT extern const char kDisableAcceleratedOverflowScroll[];
CONTENT_EXPORT extern const char kDisableLayerSquashing[]; CONTENT_EXPORT extern const char kDisableLayerSquashing[];
CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[]; CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[];
CONTENT_EXPORT extern const char kDisableAltWinstation[];
CONTENT_EXPORT extern const char kDisableApplicationCache[]; CONTENT_EXPORT extern const char kDisableApplicationCache[];
extern const char kDisableBackingStoreLimit[]; extern const char kDisableBackingStoreLimit[];
CONTENT_EXPORT extern const char kDisableCompositingForFixedPosition[]; CONTENT_EXPORT extern const char kDisableCompositingForFixedPosition[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment