OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Information about the current process. | 5 // Information about the current process. |
6 | 6 |
7 #include "rlz/win/lib/process_info.h" | 7 #include "rlz/win/lib/process_info.h" |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <Sddl.h> // For ConvertSidToStringSid. | 10 #include <Sddl.h> // For ConvertSidToStringSid. |
11 #include <LMCons.h> // For UNLEN | 11 #include <LMCons.h> // For UNLEN |
12 | 12 |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/process_util.h" | 15 #include "base/process/process_handle.h" |
16 #include "base/win/scoped_handle.h" | 16 #include "base/win/scoped_handle.h" |
17 #include "base/win/windows_version.h" | 17 #include "base/win/windows_version.h" |
18 #include "rlz/lib/assert.h" | 18 #include "rlz/lib/assert.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 HRESULT GetCurrentUser(std::wstring* name, | 22 HRESULT GetCurrentUser(std::wstring* name, |
23 std::wstring* domain, | 23 std::wstring* domain, |
24 std::wstring* sid) { | 24 std::wstring* sid) { |
25 DWORD err; | 25 DWORD err; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 186 } |
187 | 187 |
188 evaluated = true; | 188 evaluated = true; |
189 if (!has_rights) | 189 if (!has_rights) |
190 ASSERT_STRING("ProcessInfo::HasAdminRights: Does not have admin rights."); | 190 ASSERT_STRING("ProcessInfo::HasAdminRights: Does not have admin rights."); |
191 | 191 |
192 return has_rights; | 192 return has_rights; |
193 } | 193 } |
194 | 194 |
195 }; // namespace | 195 }; // namespace |
OLD | NEW |