| Index: base/process/process_posix.cc
|
| diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
|
| index 5d7007c9c9e0bc29475799d159b8a0c2f1f073de..bc2f3f8bfa628febe97f73a21120525306b6d515 100644
|
| --- a/base/process/process_posix.cc
|
| +++ b/base/process/process_posix.cc
|
| @@ -14,7 +14,6 @@
|
| namespace base {
|
|
|
| Process::Process(ProcessHandle handle) : process_(handle) {
|
| - CHECK_NE(handle, GetCurrentProcessHandle());
|
| }
|
|
|
| Process::Process(RValue other)
|
| @@ -32,22 +31,25 @@ Process& Process::operator=(RValue other) {
|
|
|
| // static
|
| Process Process::Current() {
|
| - Process process;
|
| - process.process_ = GetCurrentProcessHandle();
|
| - return process.Pass();
|
| + return Process(GetCurrentProcessHandle());
|
| }
|
|
|
| // static
|
| -Process Process::OpenWithExtraPriviles(ProcessId pid) {
|
| +Process Process::Open(ProcessId pid) {
|
| if (pid == GetCurrentProcId())
|
| return Current();
|
|
|
| - // On POSIX process handles are the same as PIDs, and there are no privileges
|
| - // to set.
|
| + // On POSIX process handles are the same as PIDs.
|
| return Process(pid);
|
| }
|
|
|
| // static
|
| +Process Process::OpenWithExtraPriviles(ProcessId pid) {
|
| + // On POSIX there are no privileges to set.
|
| + return Open(pid);
|
| +}
|
| +
|
| +// static
|
| Process Process::DeprecatedGetProcessFromHandle(ProcessHandle handle) {
|
| DCHECK_NE(handle, GetCurrentProcessHandle());
|
| return Process(handle);
|
|
|