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

Unified Diff: Source/core/dom/DocumentOrderedMap.h

Issue 18228003: Remove AtomicStringImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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: Source/core/dom/DocumentOrderedMap.h
diff --git a/Source/core/dom/DocumentOrderedMap.h b/Source/core/dom/DocumentOrderedMap.h
index f7deb3bfe0dbeba3eab4c07c4098f09750bebde7..df7a72f569650957a41b4fcb390ea607c308d62c 100644
--- a/Source/core/dom/DocumentOrderedMap.h
+++ b/Source/core/dom/DocumentOrderedMap.h
@@ -31,9 +31,9 @@
#ifndef DocumentOrderedMap_h
#define DocumentOrderedMap_h
-#include <wtf/HashCountedSet.h>
-#include <wtf/HashMap.h>
-#include <wtf/text/AtomicStringImpl.h>
+#include "wtf/HashCountedSet.h"
+#include "wtf/HashMap.h"
+#include "wtf/text/StringImpl.h"
namespace WebCore {
@@ -42,40 +42,40 @@ class TreeScope;
class DocumentOrderedMap {
public:
- void add(AtomicStringImpl*, Element*);
- void remove(AtomicStringImpl*, Element*);
+ void add(StringImpl*, Element*);
+ void remove(StringImpl*, Element*);
void clear();
- bool contains(AtomicStringImpl*) const;
- bool containsMultiple(AtomicStringImpl*) const;
+ bool contains(StringImpl*) const;
+ bool containsMultiple(StringImpl*) const;
// concrete instantiations of the get<>() method template
- Element* getElementById(AtomicStringImpl*, const TreeScope*) const;
- Element* getElementByMapName(AtomicStringImpl*, const TreeScope*) const;
- Element* getElementByLowercasedMapName(AtomicStringImpl*, const TreeScope*) const;
- Element* getElementByLabelForAttribute(AtomicStringImpl*, const TreeScope*) const;
+ Element* getElementById(StringImpl*, const TreeScope*) const;
+ Element* getElementByMapName(StringImpl*, const TreeScope*) const;
+ Element* getElementByLowercasedMapName(StringImpl*, const TreeScope*) const;
+ Element* getElementByLabelForAttribute(StringImpl*, const TreeScope*) const;
void checkConsistency() const;
void reportMemoryUsage(MemoryObjectInfo*) const;
private:
- template<bool keyMatches(AtomicStringImpl*, Element*)> Element* get(AtomicStringImpl*, const TreeScope*) const;
+ template<bool keyMatches(StringImpl*, Element*)> Element* get(StringImpl*, const TreeScope*) const;
- typedef HashMap<AtomicStringImpl*, Element*> Map;
+ typedef HashMap<StringImpl*, Element*> Map;
// We maintain the invariant that m_duplicateCounts is the count of all elements with a given key
// excluding the one referenced in m_map, if any. This means it one less than the total count
// when the first node with a given key is cached, otherwise the same as the total count.
mutable Map m_map;
- mutable HashCountedSet<AtomicStringImpl*> m_duplicateCounts;
+ mutable HashCountedSet<StringImpl*> m_duplicateCounts;
};
-inline bool DocumentOrderedMap::contains(AtomicStringImpl* id) const
+inline bool DocumentOrderedMap::contains(StringImpl* id) const
{
return m_map.contains(id) || m_duplicateCounts.contains(id);
}
-inline bool DocumentOrderedMap::containsMultiple(AtomicStringImpl* id) const
+inline bool DocumentOrderedMap::containsMultiple(StringImpl* id) const
{
return m_duplicateCounts.contains(id);
}

Powered by Google App Engine
This is Rietveld 408576698