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

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: +comment. Removed StringImpl::createStatic. Created 5 years, 1 month 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* createStatic(const char* string, unsigned length, unsigne d hash); 199 static StringImpl* createPreallocatedStatic(void* buffer, unsigned length, u nsigned hash);
200 static void reserveStaticStringsCapacityForSize(unsigned size); 200 static void reserveStaticStringsCapacityForSize(unsigned size);
201 static void freezeStaticStrings(); 201 static void freezeStaticStrings();
202 static const StaticStringsTable& allStaticStrings(); 202 static const StaticStringsTable& allStaticStrings();
203 static unsigned highestStaticStringLength() { return m_highestStaticStringLe ngth; } 203 static unsigned highestStaticStringLength() { return m_highestStaticStringLe ngth; }
204 204
205 static PassRefPtr<StringImpl> create(const UChar*, unsigned length); 205 static PassRefPtr<StringImpl> create(const UChar*, unsigned length);
206 static PassRefPtr<StringImpl> create(const LChar*, unsigned length); 206 static PassRefPtr<StringImpl> create(const LChar*, unsigned length);
207 static PassRefPtr<StringImpl> create8BitIfPossible(const UChar*, unsigned le ngth); 207 static PassRefPtr<StringImpl> create8BitIfPossible(const UChar*, unsigned le ngth);
208 template<size_t inlineCapacity> 208 template<size_t inlineCapacity>
209 static PassRefPtr<StringImpl> create8BitIfPossible(const Vector<UChar, inlin eCapacity>& vector) 209 static PassRefPtr<StringImpl> create8BitIfPossible(const Vector<UChar, inlin eCapacity>& vector)
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 } 768 }
769 769
770 using WTF::StringImpl; 770 using WTF::StringImpl;
771 using WTF::equal; 771 using WTF::equal;
772 using WTF::equalNonNull; 772 using WTF::equalNonNull;
773 using WTF::TextCaseSensitivity; 773 using WTF::TextCaseSensitivity;
774 using WTF::TextCaseSensitive; 774 using WTF::TextCaseSensitive;
775 using WTF::TextCaseInsensitive; 775 using WTF::TextCaseInsensitive;
776 776
777 #endif 777 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698