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

Unified Diff: third_party/WebKit/Source/wtf/text/AtomicStringTable.h

Issue 2111653004: Simplify AtomicStringTable and remove lots of dead code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/text/AtomicStringTable.h
diff --git a/third_party/WebKit/Source/wtf/text/AtomicStringTable.h b/third_party/WebKit/Source/wtf/text/AtomicStringTable.h
index fe56573a154404f9657b21312d104c2fd7b4ac1a..d5283f26fd5b90a754d40077b2ee9bbb12748248 100644
--- a/third_party/WebKit/Source/wtf/text/AtomicStringTable.h
+++ b/third_party/WebKit/Source/wtf/text/AtomicStringTable.h
@@ -31,19 +31,14 @@ public:
// Used by system initialization to preallocate enough storage for all of
// the static strings.
- void reserveCapacity(unsigned);
+ void reserveCapacity(unsigned size);
- // Adding a StringImpl.
+ // Inserting strings into the table. Note that the return value from adding
+ // a UChar string may be an LChar string as the table will attempt to
+ // convert the string to save memory if possible.
StringImpl* add(StringImpl*);
- PassRefPtr<StringImpl> add(StringImpl*, unsigned offset, unsigned length);
-
- // Adding an LChar.
- PassRefPtr<StringImpl> add(const LChar*, unsigned length);
-
- // Adding a UChar.
- PassRefPtr<StringImpl> add(const UChar*, unsigned length);
- PassRefPtr<StringImpl> add(const UChar*, unsigned length, unsigned existingHash);
- PassRefPtr<StringImpl> add(const UChar*);
+ PassRefPtr<StringImpl> add(const LChar* chars, unsigned length);
+ PassRefPtr<StringImpl> add(const UChar* chars, unsigned length);
// Adding UTF8.
// Returns null if the characters contain invalid utf8 sequences.
@@ -58,9 +53,6 @@ private:
template<typename T, typename HashTranslator>
inline PassRefPtr<StringImpl> addToStringTable(const T& value);
- template<typename CharacterType>
- inline HashSet<StringImpl*>::iterator find(const StringImpl*);
-
HashSet<StringImpl*> m_table;
};
« no previous file with comments | « third_party/WebKit/Source/wtf/text/AtomicString.cpp ('k') | third_party/WebKit/Source/wtf/text/AtomicStringTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698