summaryrefslogtreecommitdiffstats
path: root/net/test/spawned_test_server/local_test_server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/test/spawned_test_server/local_test_server.cc')
-rw-r--r--net/test/spawned_test_server/local_test_server.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/test/spawned_test_server/local_test_server.cc b/net/test/spawned_test_server/local_test_server.cc
index c85e05a..309c69c 100644
--- a/net/test/spawned_test_server/local_test_server.cc
+++ b/net/test/spawned_test_server/local_test_server.cc
@@ -121,18 +121,17 @@ bool LocalTestServer::BlockUntilStarted() {
bool LocalTestServer::Stop() {
CleanUpWhenStoppingServer();
- if (!process_handle_)
+ if (!process_.IsValid())
return true;
// First check if the process has already terminated.
- bool ret = base::WaitForSingleProcess(process_handle_, base::TimeDelta());
+ bool ret = base::WaitForSingleProcess(process_.Handle(), base::TimeDelta());
if (!ret) {
- ret = base::KillProcess(process_handle_, 1, true);
+ ret = base::KillProcess(process_.Handle(), 1, true);
}
if (ret) {
- base::CloseProcessHandle(process_handle_);
- process_handle_ = base::kNullProcessHandle;
+ process_.Close();
} else {
VLOG(1) << "Kill failed?";
}
@@ -149,7 +148,6 @@ bool LocalTestServer::Init(const base::FilePath& document_root) {
// number out over a pipe that this TestServer object will read from. Once
// that is complete, the host port pair will contain the actual port.
DCHECK(!GetPort());
- process_handle_ = base::kNullProcessHandle;
base::FilePath src_dir;
if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir))