Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: sandbox/win/src/handle_table.h

Issue 119713003: Add base:: to string16s in sandbox/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/win/src/handle_closer_test.cc ('k') | sandbox/win/src/handle_table.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 bool operator!=(const HandleEntry& rhs) const { 47 bool operator!=(const HandleEntry& rhs) const {
48 return handle_entry_ != rhs.handle_entry_; 48 return handle_entry_ != rhs.handle_entry_;
49 } 49 }
50 50
51 const SYSTEM_HANDLE_INFORMATION* handle_entry() const { 51 const SYSTEM_HANDLE_INFORMATION* handle_entry() const {
52 return handle_entry_; 52 return handle_entry_;
53 } 53 }
54 54
55 const OBJECT_TYPE_INFORMATION* TypeInfo(); 55 const OBJECT_TYPE_INFORMATION* TypeInfo();
56 56
57 const string16& Name(); 57 const base::string16& Name();
58 58
59 const string16& Type(); 59 const base::string16& Type();
60 60
61 bool IsType(const string16& type_string); 61 bool IsType(const base::string16& type_string);
62 62
63 private: 63 private:
64 friend class Iterator; 64 friend class Iterator;
65 friend class HandleTable; 65 friend class HandleTable;
66 66
67 enum UpdateType { 67 enum UpdateType {
68 UPDATE_INFO_ONLY, 68 UPDATE_INFO_ONLY,
69 UPDATE_INFO_AND_NAME, 69 UPDATE_INFO_AND_NAME,
70 UPDATE_INFO_AND_TYPE_NAME, 70 UPDATE_INFO_AND_TYPE_NAME,
71 }; 71 };
72 72
73 explicit HandleEntry(const SYSTEM_HANDLE_INFORMATION* handle_info_entry); 73 explicit HandleEntry(const SYSTEM_HANDLE_INFORMATION* handle_info_entry);
74 74
75 bool needs_info_update() { return handle_entry_ != last_entry_; } 75 bool needs_info_update() { return handle_entry_ != last_entry_; }
76 76
77 void UpdateInfo(UpdateType flag); 77 void UpdateInfo(UpdateType flag);
78 78
79 OBJECT_TYPE_INFORMATION* type_info_internal() { 79 OBJECT_TYPE_INFORMATION* type_info_internal() {
80 return reinterpret_cast<OBJECT_TYPE_INFORMATION*>( 80 return reinterpret_cast<OBJECT_TYPE_INFORMATION*>(
81 &(type_info_buffer_[0])); 81 &(type_info_buffer_[0]));
82 } 82 }
83 83
84 const SYSTEM_HANDLE_INFORMATION* handle_entry_; 84 const SYSTEM_HANDLE_INFORMATION* handle_entry_;
85 const SYSTEM_HANDLE_INFORMATION* last_entry_; 85 const SYSTEM_HANDLE_INFORMATION* last_entry_;
86 std::vector<BYTE> type_info_buffer_; 86 std::vector<BYTE> type_info_buffer_;
87 string16 handle_name_; 87 base::string16 handle_name_;
88 string16 type_name_; 88 base::string16 type_name_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(HandleEntry); 90 DISALLOW_COPY_AND_ASSIGN(HandleEntry);
91 }; 91 };
92 92
93 class Iterator { 93 class Iterator {
94 public: 94 public:
95 Iterator(const HandleTable& table, const SYSTEM_HANDLE_INFORMATION* start, 95 Iterator(const HandleTable& table, const SYSTEM_HANDLE_INFORMATION* start,
96 const SYSTEM_HANDLE_INFORMATION* stop); 96 const SYSTEM_HANDLE_INFORMATION* stop);
97 97
98 Iterator(const Iterator& it); 98 Iterator(const Iterator& it);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « sandbox/win/src/handle_closer_test.cc ('k') | sandbox/win/src/handle_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698