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

Unified Diff: Source/modules/encoding/TextDecoder.cpp

Issue 269593009: Encoding API: Update tests and simplify constructors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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/modules/encoding/TextDecoder.h ('k') | Source/modules/encoding/TextEncoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/encoding/TextDecoder.cpp
diff --git a/Source/modules/encoding/TextDecoder.cpp b/Source/modules/encoding/TextDecoder.cpp
index 84df22cad1c6f5b8fa545d123d5e612747d6da51..dbd1eb3fbd9a7a6ecffab3fc70d1e75620c2acdc 100644
--- a/Source/modules/encoding/TextDecoder.cpp
+++ b/Source/modules/encoding/TextDecoder.cpp
@@ -51,13 +51,13 @@ TextDecoder* TextDecoder::create(const String& label, const Dictionary& options,
bool fatal = false;
options.get("fatal", fatal);
- return new TextDecoder(encoding.name(), fatal);
+ return new TextDecoder(encoding, fatal);
}
-TextDecoder::TextDecoder(const String& encoding, bool fatal)
+TextDecoder::TextDecoder(const WTF::TextEncoding& encoding, bool fatal)
: m_encoding(encoding)
- , m_codec(newTextCodec(m_encoding))
+ , m_codec(newTextCodec(encoding))
, m_fatal(fatal)
, m_bomSeen(false)
{
« no previous file with comments | « Source/modules/encoding/TextDecoder.h ('k') | Source/modules/encoding/TextEncoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698