OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 WTF_AtomicStringTable_h | 5 #ifndef WTF_AtomicStringTable_h |
6 #define WTF_AtomicStringTable_h | 6 #define WTF_AtomicStringTable_h |
7 | 7 |
8 #include "wtf/Allocator.h" | 8 #include "platform/wtf/Allocator.h" |
9 #include "wtf/HashSet.h" | 9 #include "platform/wtf/HashSet.h" |
10 #include "wtf/WTFExport.h" | 10 #include "platform/wtf/WTFExport.h" |
11 #include "wtf/WTFThreadData.h" | 11 #include "platform/wtf/WTFThreadData.h" |
12 #include "wtf/text/StringHash.h" | 12 #include "platform/wtf/text/StringHash.h" |
13 #include "wtf/text/StringImpl.h" | 13 #include "platform/wtf/text/StringImpl.h" |
14 | 14 |
15 namespace WTF { | 15 namespace WTF { |
16 | 16 |
17 // The underlying storage that keeps the map of unique AtomicStrings. This is | 17 // The underlying storage that keeps the map of unique AtomicStrings. This is |
18 // not thread safe and each WTFThreadData has one. | 18 // not thread safe and each WTFThreadData has one. |
19 class WTF_EXPORT AtomicStringTable final { | 19 class WTF_EXPORT AtomicStringTable final { |
20 USING_FAST_MALLOC(AtomicStringTable); | 20 USING_FAST_MALLOC(AtomicStringTable); |
21 WTF_MAKE_NONCOPYABLE(AtomicStringTable); | 21 WTF_MAKE_NONCOPYABLE(AtomicStringTable); |
22 | 22 |
23 public: | 23 public: |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 inline PassRefPtr<StringImpl> addToStringTable(const T& value); | 55 inline PassRefPtr<StringImpl> addToStringTable(const T& value); |
56 | 56 |
57 HashSet<StringImpl*> m_table; | 57 HashSet<StringImpl*> m_table; |
58 }; | 58 }; |
59 | 59 |
60 } // namespace WTF | 60 } // namespace WTF |
61 | 61 |
62 using WTF::AtomicStringTable; | 62 using WTF::AtomicStringTable; |
63 | 63 |
64 #endif | 64 #endif |
OLD | NEW |