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

Side by Side Diff: third_party/WebKit/Source/wtf/text/StringImpl.h

Issue 1405573003: Introduce StringImpl::createPreallocatedStatic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Google Inc. All rights reserved. 4 * Copyright (C) 2009 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 , m_hash(hash) 189 , m_hash(hash)
190 , m_isAtomic(false) 190 , m_isAtomic(false)
191 , m_is8Bit(true) 191 , m_is8Bit(true)
192 , m_isStatic(true) 192 , m_isStatic(true)
193 { 193 {
194 } 194 }
195 195
196 public: 196 public:
197 ~StringImpl(); 197 ~StringImpl();
198 198
199 static StringImpl* createPreallocatedStatic(void* buffer, unsigned length, u nsigned hash);
199 static StringImpl* createStatic(const char* string, unsigned length, unsigne d hash); 200 static StringImpl* createStatic(const char* string, unsigned length, unsigne d hash);
200 static void reserveStaticStringsCapacityForSize(unsigned size); 201 static void reserveStaticStringsCapacityForSize(unsigned size);
201 static void freezeStaticStrings(); 202 static void freezeStaticStrings();
202 static const StaticStringsTable& allStaticStrings(); 203 static const StaticStringsTable& allStaticStrings();
203 static unsigned highestStaticStringLength() { return m_highestStaticStringLe ngth; } 204 static unsigned highestStaticStringLength() { return m_highestStaticStringLe ngth; }
204 205
205 static PassRefPtr<StringImpl> create(const UChar*, unsigned length); 206 static PassRefPtr<StringImpl> create(const UChar*, unsigned length);
206 static PassRefPtr<StringImpl> create(const LChar*, unsigned length); 207 static PassRefPtr<StringImpl> create(const LChar*, unsigned length);
207 static PassRefPtr<StringImpl> create8BitIfPossible(const UChar*, unsigned le ngth); 208 static PassRefPtr<StringImpl> create8BitIfPossible(const UChar*, unsigned le ngth);
208 template<size_t inlineCapacity> 209 template<size_t inlineCapacity>
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 } 778 }
778 779
779 using WTF::StringImpl; 780 using WTF::StringImpl;
780 using WTF::equal; 781 using WTF::equal;
781 using WTF::equalNonNull; 782 using WTF::equalNonNull;
782 using WTF::TextCaseSensitivity; 783 using WTF::TextCaseSensitivity;
783 using WTF::TextCaseSensitive; 784 using WTF::TextCaseSensitive;
784 using WTF::TextCaseInsensitive; 785 using WTF::TextCaseInsensitive;
785 786
786 #endif 787 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698