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

Unified Diff: base/process/process_posix.cc

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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: base/process/process_posix.cc
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index 58852bc388c5053f618d86aa01900c0cab771d99..93dec98a0f705e15a82fb6c17a95391785788800 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -38,6 +38,16 @@ Process Process::Current() {
}
// static
+Process Process::OpenWithExtraPriviles(ProcessId pid) {
+ if (pid == GetCurrentProcId())
+ return Current();
+
+ // On POSIX process handles are the same as PIDs, and there are no privileges
+ // to set.
+ return Process(pid);
+}
+
+// static
Process Process::DeprecatedGetProcessFromHandle(ProcessHandle handle) {
DCHECK_NE(handle, GetCurrentProcessHandle());
return Process(handle);
« no previous file with comments | « base/process/process_linux.cc ('k') | base/process/process_unittest.cc » ('j') | shell/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698