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 #ifndef SANDBOX_SRC_HANDLE_TABLE_H_ | 5 #ifndef SANDBOX_SRC_HANDLE_TABLE_H_ |
6 #define SANDBOX_SRC_HANDLE_TABLE_H_ | 6 #define SANDBOX_SRC_HANDLE_TABLE_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "sandbox/win/src/nt_internals.h" | 13 #include "sandbox/win/src/nt_internals.h" |
14 | 14 |
15 namespace sandbox { | 15 namespace sandbox { |
16 | 16 |
17 // HandleTable retrieves the global handle table and provides helper classes | 17 // HandleTable retrieves the global handle table and provides helper classes |
18 // for iterating through the table and retrieving handle info. | 18 // for iterating through the table and retrieving handle info. |
19 class HandleTable { | 19 class HandleTable { |
20 public: | 20 public: |
21 static const char16* HandleTable::kTypeProcess; | 21 static const base::char16* HandleTable::kTypeProcess; |
22 static const char16* HandleTable::kTypeThread; | 22 static const base::char16* HandleTable::kTypeThread; |
23 static const char16* HandleTable::kTypeFile; | 23 static const base::char16* HandleTable::kTypeFile; |
24 static const char16* HandleTable::kTypeDirectory; | 24 static const base::char16* HandleTable::kTypeDirectory; |
25 static const char16* HandleTable::kTypeKey; | 25 static const base::char16* HandleTable::kTypeKey; |
26 static const char16* HandleTable::kTypeWindowStation; | 26 static const base::char16* HandleTable::kTypeWindowStation; |
27 static const char16* HandleTable::kTypeDesktop; | 27 static const base::char16* HandleTable::kTypeDesktop; |
28 static const char16* HandleTable::kTypeService; | 28 static const base::char16* HandleTable::kTypeService; |
29 static const char16* HandleTable::kTypeMutex; | 29 static const base::char16* HandleTable::kTypeMutex; |
30 static const char16* HandleTable::kTypeSemaphore; | 30 static const base::char16* HandleTable::kTypeSemaphore; |
31 static const char16* HandleTable::kTypeEvent; | 31 static const base::char16* HandleTable::kTypeEvent; |
32 static const char16* HandleTable::kTypeTimer; | 32 static const base::char16* HandleTable::kTypeTimer; |
33 static const char16* HandleTable::kTypeNamedPipe; | 33 static const base::char16* HandleTable::kTypeNamedPipe; |
34 static const char16* HandleTable::kTypeJobObject; | 34 static const base::char16* HandleTable::kTypeJobObject; |
35 static const char16* HandleTable::kTypeFileMap; | 35 static const base::char16* HandleTable::kTypeFileMap; |
36 static const char16* HandleTable::kTypeAlpcPort; | 36 static const base::char16* HandleTable::kTypeAlpcPort; |
37 | 37 |
38 class Iterator; | 38 class Iterator; |
39 | 39 |
40 // Used by the iterator to provide simple caching accessors to handle data. | 40 // Used by the iterator to provide simple caching accessors to handle data. |
41 class HandleEntry { | 41 class HandleEntry { |
42 public: | 42 public: |
43 bool operator==(const HandleEntry& rhs) const { | 43 bool operator==(const HandleEntry& rhs) const { |
44 return handle_entry_ == rhs.handle_entry_; | 44 return handle_entry_ == rhs.handle_entry_; |
45 } | 45 } |
46 | 46 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 150 } |
151 | 151 |
152 std::vector<BYTE> handle_info_buffer_; | 152 std::vector<BYTE> handle_info_buffer_; |
153 | 153 |
154 DISALLOW_COPY_AND_ASSIGN(HandleTable); | 154 DISALLOW_COPY_AND_ASSIGN(HandleTable); |
155 }; | 155 }; |
156 | 156 |
157 } // namespace sandbox | 157 } // namespace sandbox |
158 | 158 |
159 #endif // SANDBOX_SRC_HANDLE_TABLE_H_ | 159 #endif // SANDBOX_SRC_HANDLE_TABLE_H_ |
OLD | NEW |