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

Unified Diff: chrome/service/service_child_process_host.cc

Issue 5947002: As the first step in an effort to improve robustness of the cloud print proxy... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Review comments Created 10 years 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/service/service_child_process_host.h ('k') | chrome/service/service_utility_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_child_process_host.cc
===================================================================
--- chrome/service/service_child_process_host.cc (revision 69859)
+++ chrome/service/service_child_process_host.cc (working copy)
@@ -4,8 +4,10 @@
#include "chrome/service/service_child_process_host.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/process_util.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/result_codes.h"
#if defined(OS_WIN)
@@ -23,13 +25,22 @@
}
bool ServiceChildProcessHost::Launch(CommandLine* cmd_line,
+ bool no_sandbox,
const FilePath& exposed_dir) {
#if !defined(OS_WIN)
// TODO(sanjeevr): Implement for non-Windows OSes.
NOTIMPLEMENTED();
return false;
#else // !defined(OS_WIN)
- set_handle(sandbox::StartProcessWithAccess(cmd_line, exposed_dir));
+
+ if (no_sandbox) {
+ base::ProcessHandle process = base::kNullProcessHandle;
+ cmd_line->AppendSwitch(switches::kNoSandbox);
+ base::LaunchApp(*cmd_line, false, false, &process);
+ set_handle(process);
+ } else {
+ set_handle(sandbox::StartProcessWithAccess(cmd_line, exposed_dir));
+ }
return (handle() != base::kNullProcessHandle);
#endif // !defined(OS_WIN)
}
« no previous file with comments | « chrome/service/service_child_process_host.h ('k') | chrome/service/service_utility_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698