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

Unified Diff: Source/WTF/wtf/text/StringImpl.h

Issue 13529026: Removing a bunch of unused platform code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix whitespace and compiler error on Mac. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WTF/wtf/text/AtomicString.h ('k') | Source/WTF/wtf/text/StringImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WTF/wtf/text/StringImpl.h
diff --git a/Source/WTF/wtf/text/StringImpl.h b/Source/WTF/wtf/text/StringImpl.h
index fb4a6708835b7cdb69741d30bae88638822ab334..cd95184beab305d19c4a1100c735f77c363ec81b 100644
--- a/Source/WTF/wtf/text/StringImpl.h
+++ b/Source/WTF/wtf/text/StringImpl.h
@@ -31,10 +31,6 @@
#include <wtf/Vector.h>
#include <wtf/unicode/Unicode.h>
-#if PLATFORM(QT)
-#include <QString>
-#endif
-
#if USE(CF)
typedef const struct __CFString * CFStringRef;
#endif
@@ -153,9 +149,6 @@ private:
BufferInternal,
BufferOwned,
BufferSubstring,
-#if PLATFORM(QT)
- BufferAdoptedQString
-#endif
// NOTE: Adding more ownership types needs to extend m_hashAndFlags as we're at capacity
};
@@ -322,32 +315,6 @@ private:
STRING_STATS_ADD_16BIT_STRING(m_length);
}
-
-#if PLATFORM(QT)
- // Used to create new strings that adopt an existing QString's data
- enum ConstructAdoptedQStringTag { ConstructAdoptedQString };
- StringImpl(QStringData* qStringData, ConstructAdoptedQStringTag)
- : m_refCount(s_refCountIncrement)
- , m_length(qStringData->size)
- , m_data16(0)
- , m_qStringData(qStringData)
- , m_hashAndFlags(BufferAdoptedQString)
- {
- ASSERT(m_length);
-
- // We ref the string-data to ensure it will be valid for the lifetime of
- // this string. We then deref it in the destructor, so that the string
- // data can eventually be freed.
- m_qStringData->ref.ref();
-
- // Now that we have a ref we can safely reference the string data
- m_data16 = reinterpret_cast_ptr<const UChar*>(qStringData->data());
- ASSERT(m_data16);
-
- STRING_STATS_ADD_16BIT_STRING(m_length);
- }
-#endif
-
public:
WTF_EXPORT_STRING_API ~StringImpl();
@@ -459,10 +426,6 @@ public:
WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> adopt(StringBuffer<UChar>&);
WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> adopt(StringBuffer<LChar>&);
-#if PLATFORM(QT)
- static PassRefPtr<StringImpl> adopt(QStringData*);
-#endif
-
unsigned length() const { return m_length; }
bool is8Bit() const { return m_hashAndFlags & s_hashFlag8BitBuffer; }
bool hasInternalBuffer() const { return bufferOwnership() == BufferInternal; }
@@ -531,10 +494,6 @@ public:
bool isSubString() const { return bufferOwnership() == BufferSubstring; }
#endif
-#if PLATFORM(QT)
- QStringData* qStringData() { return bufferOwnership() == BufferAdoptedQString ? m_qStringData : 0; }
-#endif
-
private:
// The high bits of 'hash' are always empty, but we prefer to store our flags
// in the low bits because it makes them slightly more efficient to access.
@@ -809,9 +768,6 @@ private:
void* m_buffer;
StringImpl* m_substringBuffer;
mutable UChar* m_copyData16;
-#if PLATFORM(QT)
- QStringData* m_qStringData;
-#endif
};
mutable unsigned m_hashAndFlags;
};
« no previous file with comments | « Source/WTF/wtf/text/AtomicString.h ('k') | Source/WTF/wtf/text/StringImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698