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

Unified Diff: Source/modules/encoding/TextEncoder.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/TextEncoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/encoding/TextEncoder.cpp
diff --git a/Source/modules/encoding/TextEncoder.cpp b/Source/modules/encoding/TextEncoder.cpp
index 2cfa360b6014cda4cda9300cdb3684d13847cc5b..b1d2be1afa8e37e9920bf1c661c44c5ea636e398 100644
--- a/Source/modules/encoding/TextEncoder.cpp
+++ b/Source/modules/encoding/TextEncoder.cpp
@@ -55,12 +55,12 @@ TextEncoder* TextEncoder::create(const String& utfLabel, ExceptionState& excepti
return 0;
}
- return new TextEncoder(encoding.name());
+ return new TextEncoder(encoding);
}
-TextEncoder::TextEncoder(const String& encoding)
+TextEncoder::TextEncoder(const WTF::TextEncoding& encoding)
: m_encoding(encoding)
- , m_codec(newTextCodec(m_encoding))
+ , m_codec(newTextCodec(encoding))
{
}
« no previous file with comments | « Source/modules/encoding/TextEncoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698