summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authorrvargas <rvargas@chromium.org>2015-02-04 13:11:29 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-04 21:12:35 +0000
commit6b039c379ae314520617fae279194b77f2441ea9 (patch)
tree1b807f607ce37544762acca0f3bbd23b50b6b68d /sandbox
parentafebf76e26c5cecb3fa043c410f64ed96243a09e (diff)
downloadchromium_src-6b039c379ae314520617fae279194b77f2441ea9.zip
chromium_src-6b039c379ae314520617fae279194b77f2441ea9.tar.gz
chromium_src-6b039c379ae314520617fae279194b77f2441ea9.tar.bz2
Move OpenProcessHandle to Process::Open.
This removes another source of raw process handles. BUG=417532 Review URL: https://codereview.chromium.org/868543002 Cr-Commit-Position: refs/heads/master@{#314633}
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/linux/services/unix_domain_socket_unittest.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/sandbox/linux/services/unix_domain_socket_unittest.cc b/sandbox/linux/services/unix_domain_socket_unittest.cc
index 4d57c0d..dafa91d 100644
--- a/sandbox/linux/services/unix_domain_socket_unittest.cc
+++ b/sandbox/linux/services/unix_domain_socket_unittest.cc
@@ -17,7 +17,7 @@
#include "base/memory/scoped_vector.h"
#include "base/posix/eintr_wrapper.h"
#include "base/posix/unix_domain_socket_linux.h"
-#include "base/process/process_handle.h"
+#include "base/process/process.h"
#include "sandbox/linux/services/syscall_wrappers.h"
#include "sandbox/linux/tests/unit_tests.h"
@@ -57,10 +57,9 @@ base::ProcessId GetParentProcessId(base::ProcessId pid) {
// base::GetParentProcessId() is defined as taking a ProcessHandle instead of
// a ProcessId, even though it's a POSIX-only function and IDs and Handles
// are both simply pid_t on POSIX... :/
- base::ProcessHandle handle;
- CHECK(base::OpenProcessHandle(pid, &handle));
- base::ProcessId ret = base::GetParentProcessId(pid);
- base::CloseProcessHandle(handle);
+ base::Process process = base::Process::Open(pid);
+ CHECK(process.IsValid());
+ base::ProcessId ret = base::GetParentProcessId(process.Handle());
return ret;
}