OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_COMMON_ID_MAP_H_ | 5 #ifndef BASE_ID_MAP_H_ |
6 #define CHROME_COMMON_ID_MAP_H_ | 6 #define BASE_ID_MAP_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/hash_tables.h" | 11 #include "base/hash_tables.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 | 13 |
14 // This object maintains a list of IDs that can be quickly converted to | 14 // This object maintains a list of IDs that can be quickly converted to |
15 // pointers to objects. It is implemented as a hash table, optimized for | 15 // pointers to objects. It is implemented as a hash table, optimized for |
16 // relatively small data sets (in the common case, there will be exactly one | 16 // relatively small data sets (in the common case, there will be exactly one |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 int32 next_id_; | 152 int32 next_id_; |
153 | 153 |
154 HashTable data_; | 154 HashTable data_; |
155 | 155 |
156 // See description above setter. | 156 // See description above setter. |
157 bool check_on_null_data_; | 157 bool check_on_null_data_; |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(IDMap); | 159 DISALLOW_COPY_AND_ASSIGN(IDMap); |
160 }; | 160 }; |
161 | 161 |
162 #endif // CHROME_COMMON_ID_MAP_H_ | 162 #endif // BASE_ID_MAP_H_ |
OLD | NEW |