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

Unified Diff: sdk/lib/io/string_transformer.dart

Issue 12440002: Make instances of HeaderValue and ContentType immutable (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from nweiz@ Created 7 years, 9 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 | « sdk/lib/io/http_headers.dart ('k') | tests/standalone/io/http_advanced_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/string_transformer.dart
diff --git a/sdk/lib/io/string_transformer.dart b/sdk/lib/io/string_transformer.dart
index fdae9b904a76a2dff87ed93416300f9772ffa9ae..2b02639f474f2cb64d2c5a5a75b346f43a20bbcf 100644
--- a/sdk/lib/io/string_transformer.dart
+++ b/sdk/lib/io/string_transformer.dart
@@ -8,16 +8,23 @@ part of dart.io;
* String encodings.
*/
class Encoding {
- static const Encoding UTF_8 = const Encoding._internal("UTF-8");
- static const Encoding ISO_8859_1 = const Encoding._internal("ISO-8859-1");
- static const Encoding ASCII = const Encoding._internal("ASCII");
+ static const Encoding UTF_8 = const Encoding._internal("utf-8");
+ static const Encoding ISO_8859_1 = const Encoding._internal("iso-8859-1");
+ static const Encoding ASCII = const Encoding._internal("us-ascii");
+
+ /**
+ * Name of the encoding. This will be the lower-case version of one of the
+ * IANA official names for the character set (see
+ * http://www.iana.org/assignments/character-sets/character-sets.xml)
+ */
+ final String name;
+
/**
* SYSTEM encoding is the current code page on Windows and UTF-8 on
* Linux and Mac.
*/
- static const Encoding SYSTEM = const Encoding._internal("SYSTEM");
+ static const Encoding SYSTEM = const Encoding._internal("system");
const Encoding._internal(String this.name);
- final String name;
}
« no previous file with comments | « sdk/lib/io/http_headers.dart ('k') | tests/standalone/io/http_advanced_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698