| Index: base/process_posix.cc
|
| diff --git a/base/process_posix.cc b/base/process_posix.cc
|
| index ee70e5ab3f2457f1b53e2a23a54f7f6d84f11ed0..6e65ebfd6cf45ec8b966e3c70418f6729afe3fed 100644
|
| --- a/base/process_posix.cc
|
| +++ b/base/process_posix.cc
|
| @@ -13,6 +13,22 @@
|
|
|
| namespace base {
|
|
|
| +// static
|
| +Process Process::Current() {
|
| + return Process(GetCurrentProcessHandle());
|
| +}
|
| +
|
| +ProcessId Process::pid() const {
|
| + if (process_ == 0)
|
| + return 0;
|
| +
|
| + return GetProcId(process_);
|
| +}
|
| +
|
| +bool Process::is_current() const {
|
| + return process_ == GetCurrentProcessHandle();
|
| +}
|
| +
|
| void Process::Close() {
|
| process_ = 0;
|
| // if the process wasn't terminated (so we waited) or the state
|
| @@ -43,22 +59,6 @@ bool Process::SetProcessBackgrounded(bool value) {
|
| }
|
| #endif
|
|
|
| -ProcessId Process::pid() const {
|
| - if (process_ == 0)
|
| - return 0;
|
| -
|
| - return GetProcId(process_);
|
| -}
|
| -
|
| -bool Process::is_current() const {
|
| - return process_ == GetCurrentProcessHandle();
|
| -}
|
| -
|
| -// static
|
| -Process Process::Current() {
|
| - return Process(GetCurrentProcessHandle());
|
| -}
|
| -
|
| int Process::GetPriority() const {
|
| DCHECK(process_);
|
| return getpriority(PRIO_PROCESS, process_);
|
|
|