OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" | 5 #include "base/process.h" |
6 | 6 |
7 #include <sys/types.h> | 7 #include <sys/types.h> |
8 #include <sys/time.h> | 8 #include <sys/time.h> |
9 #include <sys/resource.h> | 9 #include <sys/resource.h> |
10 | 10 |
11 #include "base/process_util.h" | 11 #include "base/process_util.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // See SetProcessBackgrounded(). | 50 // See SetProcessBackgrounded(). |
51 return false; | 51 return false; |
52 } | 52 } |
53 | 53 |
54 bool Process::SetProcessBackgrounded(bool value) { | 54 bool Process::SetProcessBackgrounded(bool value) { |
55 // POSIX only allows lowering the priority of a process, so if we | 55 // POSIX only allows lowering the priority of a process, so if we |
56 // were to lower it we wouldn't be able to raise it back to its initial | 56 // were to lower it we wouldn't be able to raise it back to its initial |
57 // priority. | 57 // priority. |
58 return false; | 58 return false; |
59 } | 59 } |
| 60 |
| 61 // static |
| 62 bool Process::CanBackgroundProcesses() { |
| 63 return false; |
| 64 } |
| 65 |
60 #endif | 66 #endif |
61 | 67 |
62 int Process::GetPriority() const { | 68 int Process::GetPriority() const { |
63 DCHECK(process_); | 69 DCHECK(process_); |
64 return getpriority(PRIO_PROCESS, process_); | 70 return getpriority(PRIO_PROCESS, process_); |
65 } | 71 } |
66 | 72 |
67 } // namspace base | 73 } // namspace base |
OLD | NEW |