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

Unified Diff: third_party/WebKit/Source/wtf/text/CString.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
« no previous file with comments | « third_party/WebKit/Source/wtf/text/CString.h ('k') | third_party/WebKit/Source/wtf/text/CStringTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/text/CString.cpp
diff --git a/third_party/WebKit/Source/wtf/text/CString.cpp b/third_party/WebKit/Source/wtf/text/CString.cpp
index 8fee95f25312d270dbd5efc449aa4d0dcfbe4465..4bab024171793196ad958ed0fb567e5eb5fe3e83 100644
--- a/third_party/WebKit/Source/wtf/text/CString.cpp
+++ b/third_party/WebKit/Source/wtf/text/CString.cpp
@@ -35,22 +35,22 @@ using namespace std;
namespace WTF {
-PassRefPtr<CStringBuffer> CStringBuffer::createUninitialized(size_t length,
- char*& data) {
+PassRefPtr<CStringImpl> CStringImpl::createUninitialized(size_t length,
+ char*& data) {
// TODO(esprehn): This doesn't account for the NUL.
RELEASE_ASSERT(length <
- (numeric_limits<unsigned>::max() - sizeof(CStringBuffer)));
+ (numeric_limits<unsigned>::max() - sizeof(CStringImpl)));
// The +1 is for the terminating NUL character.
- size_t size = sizeof(CStringBuffer) + length + 1;
- CStringBuffer* buffer = static_cast<CStringBuffer*>(Partitions::bufferMalloc(
- size, WTF_HEAP_PROFILER_TYPE_NAME(CStringBuffer)));
+ size_t size = sizeof(CStringImpl) + length + 1;
+ CStringImpl* buffer = static_cast<CStringImpl*>(
+ Partitions::bufferMalloc(size, WTF_HEAP_PROFILER_TYPE_NAME(CStringImpl)));
data = reinterpret_cast<char*>(buffer + 1);
data[length] = '\0';
- return adoptRef(new (buffer) CStringBuffer(length));
+ return adoptRef(new (buffer) CStringImpl(length));
}
-void CStringBuffer::operator delete(void* ptr) {
+void CStringImpl::operator delete(void* ptr) {
Partitions::bufferFree(ptr);
}
@@ -60,7 +60,7 @@ CString::CString(const char* chars, size_t length) {
return;
}
char* data;
- m_buffer = CStringBuffer::createUninitialized(length, data);
+ m_buffer = CStringImpl::createUninitialized(length, data);
memcpy(data, chars, length);
}
« no previous file with comments | « third_party/WebKit/Source/wtf/text/CString.h ('k') | third_party/WebKit/Source/wtf/text/CStringTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698