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

Unified Diff: third_party/WebKit/Source/wtf/text/WTFString.cpp

Issue 2473093003: Fix up naming in CString. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/text/WTFString.cpp
diff --git a/third_party/WebKit/Source/wtf/text/WTFString.cpp b/third_party/WebKit/Source/wtf/text/WTFString.cpp
index c0bee9b49b2bf64d320942231f1cf14aa14b1b09..2d337d6c53ec6f34b29eac2718920a4a2d3bcb29 100644
--- a/third_party/WebKit/Source/wtf/text/WTFString.cpp
+++ b/third_party/WebKit/Source/wtf/text/WTFString.cpp
@@ -535,14 +535,14 @@ CString String::ascii() const {
unsigned length = this->length();
if (!length) {
char* characterBuffer;
- return CString::newUninitialized(length, characterBuffer);
+ return CString::createUninitialized(length, characterBuffer);
}
if (this->is8Bit()) {
const LChar* characters = this->characters8();
char* characterBuffer;
- CString result = CString::newUninitialized(length, characterBuffer);
+ CString result = CString::createUninitialized(length, characterBuffer);
for (unsigned i = 0; i < length; ++i) {
LChar ch = characters[i];
@@ -555,7 +555,7 @@ CString String::ascii() const {
const UChar* characters = this->characters16();
char* characterBuffer;
- CString result = CString::newUninitialized(length, characterBuffer);
+ CString result = CString::createUninitialized(length, characterBuffer);
for (unsigned i = 0; i < length; ++i) {
UChar ch = characters[i];
@@ -581,7 +581,7 @@ CString String::latin1() const {
const UChar* characters = this->characters16();
char* characterBuffer;
- CString result = CString::newUninitialized(length, characterBuffer);
+ CString result = CString::createUninitialized(length, characterBuffer);
for (unsigned i = 0; i < length; ++i) {
UChar ch = characters[i];
@@ -609,11 +609,11 @@ CString String::utf8(UTF8ConversionMode mode) const {
// Allocate a buffer big enough to hold all the characters
// (an individual UTF-16 UChar can only expand to 3 UTF-8 bytes).
// Optimization ideas, if we find this function is hot:
- // * We could speculatively create a CStringBuffer to contain 'length'
+ // * We could speculatively create a CStringImpl to contain 'length'
// characters, and resize if necessary (i.e. if the buffer contains
// non-ascii characters). (Alternatively, scan the buffer first for
// ascii characters, so we know this will be sufficient).
- // * We could allocate a CStringBuffer with an appropriate size to
+ // * We could allocate a CStringImpl with an appropriate size to
// have a good chance of being able to write the string into the
// buffer without reallocing (say, 1.5 x length).
if (length > std::numeric_limits<unsigned>::max() / 3)
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextCodecUserDefined.cpp ('k') | third_party/WebKit/public/platform/WebCString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698