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

Unified Diff: sandbox/linux/services/unix_domain_socket_unittest.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
Index: sandbox/linux/services/unix_domain_socket_unittest.cc
diff --git a/sandbox/linux/services/unix_domain_socket_unittest.cc b/sandbox/linux/services/unix_domain_socket_unittest.cc
index 4d57c0d2fce5ab464ca75ab1e9aa9db528b9f4da..dafa91d44fd3b544035391c06ed85f0781948b9f 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;
}
« no previous file with comments | « sandbox/linux/services/namespace_sandbox_unittest.cc ('k') | sandbox/linux/suid/client/setuid_sandbox_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698