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 5c1c5406f5af30f85631655cc9ba0340752e8d1c..b9db337d61221ddcfb96e65b79f43b950f2f0025 100644 |
--- a/third_party/WebKit/public/platform/WebString.h |
+++ b/third_party/WebKit/public/platform/WebString.h |
@@ -79,6 +79,12 @@ namespace blink { |
// |
class WebString { |
public: |
+ enum UTF8ConversionMode { |
jochen (gone - plz use gerrit)
2017/01/13 08:42:31
nit. why not an enum class? constants should start
kinuko
2017/01/17 07:15:49
Done.
|
+ LenientUTF8Conversion, |
+ StrictUTF8Conversion, |
+ StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD |
+ }; |
+ |
~WebString() { reset(); } |
WebString() {} |
@@ -104,7 +110,8 @@ class WebString { |
bool isEmpty() const { return !length(); } |
bool isNull() const { return m_private.isNull(); } |
- BLINK_COMMON_EXPORT std::string utf8() const; |
+ BLINK_COMMON_EXPORT std::string utf8( |
+ UTF8ConversionMode = LenientUTF8Conversion) const; |
BLINK_COMMON_EXPORT static WebString fromUTF8(const char* data, |
size_t length); |