| Index: third_party/WebKit/Source/wtf/text/TextCodecICU.h
|
| diff --git a/third_party/WebKit/Source/wtf/text/TextCodecICU.h b/third_party/WebKit/Source/wtf/text/TextCodecICU.h
|
| index 9b11005626912daaf218a48b06c217ec49560741..5c4803ddfde7d66bd3ec13353301634b2f2d4733 100644
|
| --- a/third_party/WebKit/Source/wtf/text/TextCodecICU.h
|
| +++ b/third_party/WebKit/Source/wtf/text/TextCodecICU.h
|
| @@ -38,50 +38,63 @@ namespace WTF {
|
| class TextCodecInput;
|
|
|
| class TextCodecICU final : public TextCodec {
|
| -public:
|
| - static void registerEncodingNames(EncodingNameRegistrar);
|
| - static void registerCodecs(TextCodecRegistrar);
|
| -
|
| - ~TextCodecICU() override;
|
| -
|
| -private:
|
| - TextCodecICU(const TextEncoding&);
|
| - static PassOwnPtr<TextCodec> create(const TextEncoding&, const void*);
|
| -
|
| - String decode(const char*, size_t length, FlushBehavior, bool stopOnError, bool& sawError) override;
|
| - CString encode(const UChar*, size_t length, UnencodableHandling) override;
|
| - CString encode(const LChar*, size_t length, UnencodableHandling) override;
|
| -
|
| - template<typename CharType>
|
| - CString encodeCommon(const CharType*, size_t length, UnencodableHandling);
|
| - CString encodeInternal(const TextCodecInput&, UnencodableHandling);
|
| -
|
| - void createICUConverter() const;
|
| - void releaseICUConverter() const;
|
| + public:
|
| + static void registerEncodingNames(EncodingNameRegistrar);
|
| + static void registerCodecs(TextCodecRegistrar);
|
| +
|
| + ~TextCodecICU() override;
|
| +
|
| + private:
|
| + TextCodecICU(const TextEncoding&);
|
| + static PassOwnPtr<TextCodec> create(const TextEncoding&, const void*);
|
| +
|
| + String decode(const char*,
|
| + size_t length,
|
| + FlushBehavior,
|
| + bool stopOnError,
|
| + bool& sawError) override;
|
| + CString encode(const UChar*, size_t length, UnencodableHandling) override;
|
| + CString encode(const LChar*, size_t length, UnencodableHandling) override;
|
| +
|
| + template <typename CharType>
|
| + CString encodeCommon(const CharType*, size_t length, UnencodableHandling);
|
| + CString encodeInternal(const TextCodecInput&, UnencodableHandling);
|
| +
|
| + void createICUConverter() const;
|
| + void releaseICUConverter() const;
|
| #if defined(USING_SYSTEM_ICU)
|
| - bool needsGBKFallbacks() const { return m_needsGBKFallbacks; }
|
| - void setNeedsGBKFallbacks(bool needsFallbacks) { m_needsGBKFallbacks = needsFallbacks; }
|
| + bool needsGBKFallbacks() const { return m_needsGBKFallbacks; }
|
| + void setNeedsGBKFallbacks(bool needsFallbacks) {
|
| + m_needsGBKFallbacks = needsFallbacks;
|
| + }
|
| #endif
|
|
|
| - int decodeToBuffer(UChar* buffer, UChar* bufferLimit, const char*& source,
|
| - const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode&);
|
| + int decodeToBuffer(UChar* buffer,
|
| + UChar* bufferLimit,
|
| + const char*& source,
|
| + const char* sourceLimit,
|
| + int32_t* offsets,
|
| + bool flush,
|
| + UErrorCode&);
|
|
|
| - TextEncoding m_encoding;
|
| - mutable UConverter* m_converterICU;
|
| + TextEncoding m_encoding;
|
| + mutable UConverter* m_converterICU;
|
| #if defined(USING_SYSTEM_ICU)
|
| - mutable bool m_needsGBKFallbacks;
|
| + mutable bool m_needsGBKFallbacks;
|
| #endif
|
| };
|
|
|
| struct ICUConverterWrapper {
|
| - WTF_MAKE_NONCOPYABLE(ICUConverterWrapper); USING_FAST_MALLOC(ICUConverterWrapper);
|
| -public:
|
| - ICUConverterWrapper() : converter(0) { }
|
| - ~ICUConverterWrapper();
|
| + WTF_MAKE_NONCOPYABLE(ICUConverterWrapper);
|
| + USING_FAST_MALLOC(ICUConverterWrapper);
|
| +
|
| + public:
|
| + ICUConverterWrapper() : converter(0) {}
|
| + ~ICUConverterWrapper();
|
|
|
| - UConverter* converter;
|
| + UConverter* converter;
|
| };
|
|
|
| -} // namespace WTF
|
| +} // namespace WTF
|
|
|
| -#endif // TextCodecICU_h
|
| +#endif // TextCodecICU_h
|
|
|