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 #include "base/logging.h" | 7 #include "base/logging.h" |
7 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
8 #include "base/process_util.h" | |
9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 | 12 |
13 void Process::Close() { | 13 void Process::Close() { |
14 if (!process_) | 14 if (!process_) |
15 return; | 15 return; |
16 | 16 |
17 // Don't call CloseHandle on a pseudo-handle. | 17 // Don't call CloseHandle on a pseudo-handle. |
18 if (process_ != ::GetCurrentProcess()) | 18 if (process_ != ::GetCurrentProcess()) |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 bool Process::CanBackgroundProcesses() { | 83 bool Process::CanBackgroundProcesses() { |
84 return true; | 84 return true; |
85 } | 85 } |
86 | 86 |
87 int Process::GetPriority() const { | 87 int Process::GetPriority() const { |
88 DCHECK(process_); | 88 DCHECK(process_); |
89 return ::GetPriorityClass(process_); | 89 return ::GetPriorityClass(process_); |
90 } | 90 } |
91 | 91 |
92 } // namespace base | 92 } // namespace base |
OLD | NEW |