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

Unified Diff: chrome/common/sandbox_init_wrapper_win.cc

Issue 341033: Sandbox Worker process on the Mac. (Closed)
Patch Set: Fix latest round of comments Created 11 years, 1 month 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 | « chrome/common/sandbox_init_wrapper_mac.cc ('k') | chrome/common/sandbox_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/sandbox_init_wrapper_win.cc
diff --git a/chrome/common/sandbox_init_wrapper_win.cc b/chrome/common/sandbox_init_wrapper_win.cc
new file mode 100644
index 0000000000000000000000000000000000000000..fe5c6df6c4019207923279205e92f67ad13f0e52
--- /dev/null
+++ b/chrome/common/sandbox_init_wrapper_win.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/sandbox_init_wrapper.h"
+
+#include "base/command_line.h"
+#include "chrome/common/chrome_switches.h"
+
+void SandboxInitWrapper::SetServices(sandbox::SandboxInterfaceInfo* info) {
+ if (info) {
+ broker_services_ = info->broker_services;
+ target_services_ = info->target_services;
+ }
+}
+
+bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
+ const std::string& process_type) {
+ if (command_line.HasSwitch(switches::kNoSandbox))
+ return true;
+ if ((process_type == switches::kRendererProcess) ||
+ (process_type == switches::kWorkerProcess) ||
+ (process_type == switches::kNaClProcess) ||
+ (process_type == switches::kUtilityProcess) ||
+ (process_type == switches::kPluginProcess &&
+ command_line.HasSwitch(switches::kSafePlugins))) {
+ if (!target_services_)
+ return false;
+ target_services_->Init();
+ }
+ return true;
+}
« no previous file with comments | « chrome/common/sandbox_init_wrapper_mac.cc ('k') | chrome/common/sandbox_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698