OLD | NEW |
1 // Copyright (c) 2011 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/process.h" | 5 #include "base/process/process.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "base/numerics/safe_conversions.h" | 8 #include "base/numerics/safe_conversions.h" |
10 #include "base/process/kill.h" | 9 #include "base/process/kill.h" |
11 #include "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
12 | 11 |
13 namespace { | 12 namespace { |
14 | 13 |
15 DWORD kBasicProcessAccess = | 14 DWORD kBasicProcessAccess = |
16 PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION | SYNCHRONIZE; | 15 PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION | SYNCHRONIZE; |
17 | 16 |
18 } // namespace | 17 } // namespace |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 180 |
182 return (::SetPriorityClass(Handle(), priority) != 0); | 181 return (::SetPriorityClass(Handle(), priority) != 0); |
183 } | 182 } |
184 | 183 |
185 int Process::GetPriority() const { | 184 int Process::GetPriority() const { |
186 DCHECK(IsValid()); | 185 DCHECK(IsValid()); |
187 return ::GetPriorityClass(Handle()); | 186 return ::GetPriorityClass(Handle()); |
188 } | 187 } |
189 | 188 |
190 } // namespace base | 189 } // namespace base |
OLD | NEW |