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

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

Issue 868543002: Move OpenProcessHandle to Process::Open. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « components/browser_watcher/watcher_metrics_provider_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 | « components/browser_watcher/watcher_metrics_provider_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698