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

Unified Diff: chrome/service/service_child_process_host.cc

Issue 8755002: Don't make ServiceChildProcessHost derive from ChildProcessInfo. It didn't really need to. This i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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
Index: chrome/service/service_child_process_host.cc
===================================================================
--- chrome/service/service_child_process_host.cc (revision 112096)
+++ chrome/service/service_child_process_host.cc (working copy)
@@ -15,13 +15,13 @@
#include "content/common/sandbox_policy.h"
#endif // defined(OS_WIN)
-ServiceChildProcessHost::ServiceChildProcessHost(ProcessType type)
- : ChildProcessInfo(type, -1) {
+ServiceChildProcessHost::ServiceChildProcessHost()
+ : handle_(base::kNullProcessHandle) {
}
ServiceChildProcessHost::~ServiceChildProcessHost() {
// We need to kill the child process when the host dies.
- base::KillProcess(handle(), content::RESULT_CODE_NORMAL_EXIT, false);
+ base::KillProcess(handle_, content::RESULT_CODE_NORMAL_EXIT, false);
}
bool ServiceChildProcessHost::Launch(CommandLine* cmd_line,
@@ -36,11 +36,10 @@
if (no_sandbox) {
base::ProcessHandle process = base::kNullProcessHandle;
cmd_line->AppendSwitch(switches::kNoSandbox);
- base::LaunchProcess(*cmd_line, base::LaunchOptions(), &process);
- set_handle(process);
+ base::LaunchProcess(*cmd_line, base::LaunchOptions(), &handle_);
} else {
- set_handle(sandbox::StartProcessWithAccess(cmd_line, exposed_dir));
+ handle_ = sandbox::StartProcessWithAccess(cmd_line, exposed_dir);
}
- return (handle() != base::kNullProcessHandle);
+ return (handle_ != base::kNullProcessHandle);
#endif // !defined(OS_WIN)
}

Powered by Google App Engine
This is Rietveld 408576698