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

Side by Side Diff: sdk/lib/io/io_sink.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * Helper class to wrap a [StreamConsumer<List<int>, T>] and provide utility 8 * Helper class to wrap a [StreamConsumer<List<int>, T>] and provide utility
9 * functions for writing to the StreamConsumer directly. The [IOSink] 9 * functions for writing to the StreamConsumer directly. The [IOSink]
10 * buffers the input given by [add] and [addString] and will delay a [consume] 10 * buffers the input given by [add] and [addString] and will delay a [consume]
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 _bindSubscription = stream.listen( 171 _bindSubscription = stream.listen(
172 _controller.add, 172 _controller.add,
173 onDone: () { 173 onDone: () {
174 if (unbind) { 174 if (unbind) {
175 completeUnbind(); 175 completeUnbind();
176 } else { 176 } else {
177 _controller.close(); 177 _controller.close();
178 } 178 }
179 }, 179 },
180 onError: _controller.signalError); 180 onError: _controller.addError);
181 if (_paused) _pause(); 181 if (_paused) _pause();
182 if (unbind) { 182 if (unbind) {
183 _pipeFuture 183 _pipeFuture
184 .then((_) => completeUnbind(), 184 .then((_) => completeUnbind(),
185 onError: (error) => completeUnbind(error)); 185 onError: (error) => completeUnbind(error));
186 return unbindCompleter.future; 186 return unbindCompleter.future;
187 } else { 187 } else {
188 return _pipeFuture.then((_) => this); 188 return _pipeFuture.then((_) => this);
189 } 189 }
190 } 190 }
191 } 191 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698