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

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

Issue 12610006: Renamed StreamSink to EventSink. Renamed signalError to addError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed inheritance back! Now create StreamSink instead of EventSink where we create them. 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
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index a145e39b086b163f6d638dee158a2a33208a6d4d..478f1a41f18af052173465a3b79e440ce2dd0c25 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -696,11 +696,11 @@ class _ChunkedTransformer extends StreamEventTransformer<List<int>, List<int>> {
final bool writeEnd;
_ChunkedTransformer({this.writeEnd: true});
- void handleData(List<int> data, StreamSink<List<int>> sink) {
+ void handleData(List<int> data, EventSink<List<int>> sink) {
_addChunk(data, sink.add);
}
- void handleDone(StreamSink<List<int>> sink) {
+ void handleDone(EventSink<List<int>> sink) {
if (writeEnd) {
_addChunk([], sink.add);
}
@@ -746,7 +746,7 @@ class _DoneTransformer implements StreamTransformer<List<int>, List<int>> {
Stream<List<int>> bind(Stream<List<int>> stream) {
var subscription = stream.listen(
_controller.add,
- onError: _controller.signalError,
+ onError: _controller.addError,
onDone: () {
_onDone();
_controller.close();
@@ -772,7 +772,7 @@ class _DataValidatorTransformer
_bytesWritten += data.length;
if (_bytesWritten > expectedTransferLength) {
subscription.cancel();
- _controller.signalError(new HttpException(
+ _controller.addError(new HttpException(
"Content size exceeds specified contentLength. "
"$_bytesWritten bytes written while expected "
"$expectedTransferLength."));
@@ -783,13 +783,13 @@ class _DataValidatorTransformer
_controller.add(data);
},
onError: (error) {
- _controller.signalError(error);
+ _controller.addError(error);
_controller.close();
},
onDone: () {
if (expectedTransferLength != null) {
if (_bytesWritten < expectedTransferLength) {
- _controller.signalError(new HttpException(
+ _controller.addError(new HttpException(
"Content size below specified contentLength. "
" $_bytesWritten bytes written while expected "
"$expectedTransferLength."));
@@ -1330,7 +1330,7 @@ class _HttpServer extends Stream<HttpRequest> implements HttpServer {
_HttpConnection connection = new _HttpConnection(socket, this);
_connections.add(connection);
},
- onError: _controller.signalError,
+ onError: _controller.addError,
onDone: _controller.close);
return _controller.stream.listen(onData,
onError: onError,
@@ -1367,7 +1367,7 @@ class _HttpServer extends Stream<HttpRequest> implements HttpServer {
}
void _handleError(AsyncError error) {
- if (!closed) _controller.signalError(error);
+ if (!closed) _controller.addError(error);
}
void _connectionClosed(_HttpConnection connection) {

Powered by Google App Engine
This is Rietveld 408576698