Chromium Code Reviews| Index: third_party/WebKit/public/platform/WebString.h |
| diff --git a/third_party/WebKit/public/platform/WebString.h b/third_party/WebKit/public/platform/WebString.h |
| index 8e4bbcc473ca4f4d985f70d943cf953a5734dfad..8be52218ee7e59a69ebbc69d368f920b596d1eae 100644 |
| --- a/third_party/WebKit/public/platform/WebString.h |
| +++ b/third_party/WebKit/public/platform/WebString.h |
| @@ -137,7 +137,7 @@ public: |
| operator base::string16() const |
| { |
| - return base::Latin1OrUTF16ToUTF16(length(), data8(), data16()); |
| + return base::Latin1OrUTF16ToUTF16(length(), data8OrNull(), data16OrNull()); |
| } |
| WebString(const base::NullableString16& s) |
| @@ -163,11 +163,14 @@ public: |
| } |
| #endif |
| -private: |
| BLINK_COMMON_EXPORT bool is8Bit() const; |
| - BLINK_COMMON_EXPORT const WebLChar* data8() const; |
| - BLINK_COMMON_EXPORT const WebUChar* data16() const; |
| + // Returns the 8- or 16-bit underlying string buffer. If the buffer is not |
| + // the corresponding type, null will be returned. |
| + BLINK_COMMON_EXPORT const WebLChar* data8OrNull() const; |
|
esprehn
2016/01/07 23:56:23
Yeah I don't want to expose this. All this patch
|
| + BLINK_COMMON_EXPORT const WebUChar* data16OrNull() const; |
| + |
| +private: |
| BLINK_COMMON_EXPORT void assign(WTF::StringImpl*); |
| WebPrivatePtr<WTF::StringImpl> m_private; |