Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: content/common/sandbox_init_win.cc

Issue 1851213002: Remove sandbox on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nacl compile issues Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/utility_process_host_impl.cc ('k') | content/common/sandbox_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_init_win.cc
diff --git a/content/common/sandbox_init_win.cc b/content/common/sandbox_init_win.cc
index 16e3e4afbd4a66e9ecf75903fcb2209820119d8d..4586d923d92db656149bfd6a488fc1bf9ea53ea2 100644
--- a/content/common/sandbox_init_win.cc
+++ b/content/common/sandbox_init_win.cc
@@ -6,40 +6,13 @@
#include "base/command_line.h"
#include "base/logging.h"
-#include "content/common/sandbox_win.h"
#include "content/public/common/content_switches.h"
-#include "sandbox/win/src/sandbox.h"
-#include "sandbox/win/src/sandbox_types.h"
namespace content {
-bool InitializeSandbox(sandbox::SandboxInterfaceInfo* sandbox_info) {
- const base::CommandLine& command_line =
- *base::CommandLine::ForCurrentProcess();
- sandbox::BrokerServices* broker_services = sandbox_info->broker_services;
- if (broker_services) {
- if (!InitBrokerServices(broker_services))
- return false;
-
- // IMPORTANT: This piece of code needs to run as early as possible in the
- // process because it will initialize the sandbox broker, which requires the
- // 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.
- if (!command_line.HasSwitch(switches::kNoSandbox)) {
- // Precreate the desktop and window station used by the renderers.
- sandbox::TargetPolicy* policy = broker_services->CreatePolicy();
- sandbox::ResultCode result = policy->CreateAlternateDesktop(true);
- CHECK(sandbox::SBOX_ERROR_FAILED_TO_SWITCH_BACK_WINSTATION != result);
- policy->Release();
- }
- return true;
- }
-
- if (command_line.HasSwitch(switches::kNoSandbox))
- return true;
-
- sandbox::TargetServices* target_services = sandbox_info->target_services;
- return InitTargetServices(target_services);
+bool InitializeSandbox(sandbox::SandboxInterfaceInfo* sandbox_info) {\
+ // Sandbox is disabled.
+ return true;
}
} // namespace content
« no previous file with comments | « content/browser/utility_process_host_impl.cc ('k') | content/common/sandbox_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698