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

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

Issue 23003023: Remove usage of dart:utf from dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 4 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/string_transformer.dart ('k') | tests/standalone/io/http_auth_digest_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/websocket_impl.dart
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart
index aec29197075b7cf80ecc23a3216acd3cfb31cc84..84aa4c90bec967259a75bef900b341d7d9a861ff 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -95,7 +95,7 @@ class _WebSocketProtocolTransformer extends StreamEventTransformer {
_currentMessageType = _WebSocketMessageType.TEXT;
_controller = new StreamController(sync: true);
_controller.stream
- .transform(new Utf8DecoderTransformer(null))
+ .transform(UTF8.decoder)
.fold(new StringBuffer(), (buffer, str) => buffer..write(str))
.then((buffer) {
sink.add(buffer.toString());
@@ -304,7 +304,7 @@ class _WebSocketProtocolTransformer extends StreamEventTransformer {
throw new WebSocketException("Protocol error");
}
if (_controlPayload.length > 2) {
- closeReason = _decodeUtf8Strict(_controlPayload.sublist(2));
+ closeReason = UTF8.decode(_controlPayload.sublist(2));
}
}
_state = CLOSED;
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | tests/standalone/io/http_auth_digest_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698