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

Unified Diff: Source/wtf/text/TextCodecReplacement.h

Issue 265973003: Implement "replacement" text encoding. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Request rebaseline the temporary chaset-replacement output Created 6 years, 7 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
Index: Source/wtf/text/TextCodecReplacement.h
diff --git a/Source/wtf/text/TextCodecReplacement.h b/Source/wtf/text/TextCodecReplacement.h
new file mode 100644
index 0000000000000000000000000000000000000000..9e37e3e364308759c7efe32aab1fda4e4b02c06a
--- /dev/null
+++ b/Source/wtf/text/TextCodecReplacement.h
@@ -0,0 +1,28 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TextCodecReplacement_h
+#define TextCodecReplacement_h
+
+#include "wtf/text/TextCodec.h"
+#include "wtf/text/TextCodecUTF8.h"
+
+namespace WTF {
+
+class TextCodecReplacement FINAL : public TextCodecUTF8 {
+public:
+ TextCodecReplacement();
+
+ static void registerEncodingNames(EncodingNameRegistrar);
+ static void registerCodecs(TextCodecRegistrar);
+
+private:
+ virtual String decode(const char*, size_t length, FlushBehavior, bool stopOnError, bool& sawError) OVERRIDE;
+
+ bool m_sentEOF;
+};
+
+} // namespace WTF
+
+#endif // TextCodecReplacement_h
« no previous file with comments | « LayoutTests/fast/encoding/charset-replacement-expected.txt ('k') | Source/wtf/text/TextCodecReplacement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698