| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/process.h" | |
| 6 | |
| 7 #include <sys/types.h> | |
| 8 #include <sys/time.h> | |
| 9 #include <sys/resource.h> | 5 #include <sys/resource.h> |
| 10 | 6 |
| 7 #include "base/logging.h" |
| 8 #include "base/process.h" |
| 11 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 12 #include "base/logging.h" | |
| 13 | 10 |
| 14 namespace base { | 11 namespace base { |
| 15 | 12 |
| 16 // static | 13 // static |
| 17 Process Process::Current() { | 14 Process Process::Current() { |
| 18 return Process(GetCurrentProcessHandle()); | 15 return Process(GetCurrentProcessHandle()); |
| 19 } | 16 } |
| 20 | 17 |
| 21 ProcessId Process::pid() const { | 18 ProcessId Process::pid() const { |
| 22 if (process_ == 0) | 19 if (process_ == 0) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 return false; | 55 return false; |
| 59 } | 56 } |
| 60 #endif | 57 #endif |
| 61 | 58 |
| 62 int Process::GetPriority() const { | 59 int Process::GetPriority() const { |
| 63 DCHECK(process_); | 60 DCHECK(process_); |
| 64 return getpriority(PRIO_PROCESS, process_); | 61 return getpriority(PRIO_PROCESS, process_); |
| 65 } | 62 } |
| 66 | 63 |
| 67 } // namspace base | 64 } // namspace base |
| OLD | NEW |