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

Side by Side Diff: third_party/WebKit/Source/wtf/text/AtomicString.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, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/AtomicString.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 27 matching lines...) Expand all
38 public: 38 public:
39 static void init(); 39 static void init();
40 40
41 AtomicString() {} 41 AtomicString() {}
42 AtomicString(const LChar* chars) 42 AtomicString(const LChar* chars)
43 : AtomicString(chars, chars ? strlen(reinterpret_cast<const char*>(chars )) : 0) {} 43 : AtomicString(chars, chars ? strlen(reinterpret_cast<const char*>(chars )) : 0) {}
44 AtomicString(const char* chars) 44 AtomicString(const char* chars)
45 : AtomicString(reinterpret_cast<const LChar*>(chars)) {} 45 : AtomicString(reinterpret_cast<const LChar*>(chars)) {}
46 AtomicString(const LChar* chars, unsigned length); 46 AtomicString(const LChar* chars, unsigned length);
47 AtomicString(const UChar* chars, unsigned length); 47 AtomicString(const UChar* chars, unsigned length);
48 AtomicString(const UChar* chars, unsigned length, unsigned existingHash);
49 AtomicString(const UChar* chars); 48 AtomicString(const UChar* chars);
50 49
51 template<size_t inlineCapacity> 50 template<size_t inlineCapacity>
52 explicit AtomicString(const Vector<UChar, inlineCapacity>& vector) 51 explicit AtomicString(const Vector<UChar, inlineCapacity>& vector)
53 : AtomicString(vector.data(), vector.size()) {} 52 : AtomicString(vector.data(), vector.size()) {}
54 53
55 // Constructing an AtomicString from a String / StringImpl can be expensive if 54 // Constructing an AtomicString from a String / StringImpl can be expensive if
56 // the StringImpl is not already atomic. 55 // the StringImpl is not already atomic.
57 explicit AtomicString(StringImpl* impl) : m_string(add(impl)) { } 56 explicit AtomicString(StringImpl* impl) : m_string(add(impl)) { }
58 explicit AtomicString(const String& s) : m_string(add(s.impl())) { } 57 explicit AtomicString(const String& s) : m_string(add(s.impl())) { }
59 58
60 AtomicString(StringImpl* baseString, unsigned start, unsigned length);
61
62 // Hash table deleted values, which are only constructed and never copied or destroyed. 59 // Hash table deleted values, which are only constructed and never copied or destroyed.
63 AtomicString(WTF::HashTableDeletedValueType) : m_string(WTF::HashTableDelete dValue) { } 60 AtomicString(WTF::HashTableDeletedValueType) : m_string(WTF::HashTableDelete dValue) { }
64 bool isHashTableDeletedValue() const { return m_string.isHashTableDeletedVal ue(); } 61 bool isHashTableDeletedValue() const { return m_string.isHashTableDeletedVal ue(); }
65 62
66 operator const String&() const { return m_string; } 63 operator const String&() const { return m_string; }
67 const String& getString() const { return m_string; } 64 const String& getString() const { return m_string; }
68 65
69 StringImpl* impl() const { return m_string.impl(); } 66 StringImpl* impl() const { return m_string.impl(); }
70 67
71 bool is8Bit() const { return m_string.is8Bit(); } 68 bool is8Bit() const { return m_string.is8Bit(); }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 using WTF::AtomicString; 213 using WTF::AtomicString;
217 using WTF::nullAtom; 214 using WTF::nullAtom;
218 using WTF::emptyAtom; 215 using WTF::emptyAtom;
219 using WTF::starAtom; 216 using WTF::starAtom;
220 using WTF::xmlAtom; 217 using WTF::xmlAtom;
221 using WTF::xmlnsAtom; 218 using WTF::xmlnsAtom;
222 using WTF::xlinkAtom; 219 using WTF::xlinkAtom;
223 220
224 #include "wtf/text/StringConcatenate.h" 221 #include "wtf/text/StringConcatenate.h"
225 #endif // AtomicString_h 222 #endif // AtomicString_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/AtomicString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698