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 BASE_ID_MAP_H__ | 5 #ifndef CHROME_COMMON_ID_MAP_H_ |
6 #define BASE_ID_MAP_H__ | 6 #define CHROME_COMMON_ID_MAP_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 | 11 |
12 // This object maintains a list of IDs that can be quickly converted to | 12 // This object maintains a list of IDs that can be quickly converted to |
13 // pointers to objects. It is implemented as a hash table, optimized for | 13 // pointers to objects. It is implemented as a hash table, optimized for |
14 // relatively small data sets (in the common case, there will be exactly one | 14 // relatively small data sets (in the common case, there will be exactly one |
15 // item in the list). | 15 // item in the list). |
16 // | 16 // |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // The next ID that we will return from Add() | 94 // The next ID that we will return from Add() |
95 int32 next_id_; | 95 int32 next_id_; |
96 | 96 |
97 HashTable data_; | 97 HashTable data_; |
98 | 98 |
99 private: | 99 private: |
100 // See description above setter. | 100 // See description above setter. |
101 bool check_on_null_data_; | 101 bool check_on_null_data_; |
102 }; | 102 }; |
103 | 103 |
104 #endif // BASE_ID_MAP_H__ | 104 #endif // CHROME_COMMON_ID_MAP_H_ |
OLD | NEW |