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

Unified Diff: chrome/app/chrome_exe_main_mac.cc

Issue 2931173003: Implement the V2 sandbox in the process launcher. (Closed)
Patch Set: Add comment explaining V2 sandbox Created 3 years, 6 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 | « no previous file | content/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_exe_main_mac.cc
diff --git a/chrome/app/chrome_exe_main_mac.cc b/chrome/app/chrome_exe_main_mac.cc
index c91126094e7ec6e2a0fcd09218a62b24a7f753ee..d27593f2bcccce39b6dc63521111253fe3d974bb 100644
--- a/chrome/app/chrome_exe_main_mac.cc
+++ b/chrome/app/chrome_exe_main_mac.cc
@@ -56,22 +56,19 @@ __attribute__((noreturn)) void SandboxExec(const char* exec_path,
// The name of the parameter containing the executable path.
const std::string exec_param = "EXECUTABLE_PATH";
- // The name of the parameter containing the PID of Chrome.
- const std::string pid_param = "CHROMIUM_PID";
- if (!server.SetParameter(exec_param, rp) ||
- !server.SetParameter(pid_param, std::to_string(getpid()))) {
+ if (!server.SetParameter(exec_param, rp)) {
fprintf(stderr, "Failed to set up parameters for sandbox.\n");
abort();
}
- if (server.InitializeSandbox() != 0) {
+ if (!server.InitializeSandbox()) {
fprintf(stderr, "Failed to initialize sandbox.\n");
abort();
}
std::vector<char*> new_argv;
- for (int i = 1; i < argc; ++i) {
+ for (int i = 0; i < argc; ++i) {
if (strcmp(argv[i], v2_sandbox_arg) != 0 &&
strncmp(argv[i], fd_mapping_arg, strlen(fd_mapping_arg)) != 0) {
new_argv.push_back(argv[i]);
« no previous file with comments | « no previous file | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698