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

Unified Diff: sdk/lib/async/stream_controller.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/async/stream_controller.dart
diff --git a/sdk/lib/async/stream_controller.dart b/sdk/lib/async/stream_controller.dart
index a9f5e71d7db2803bbbf2d846727a7a55825c2583..5097da605f7aa48eb3dbab6a365484ccc17e83ba 100644
--- a/sdk/lib/async/stream_controller.dart
+++ b/sdk/lib/async/stream_controller.dart
@@ -46,7 +46,8 @@ part of dart.async;
* the stream at all, and won't trigger callbacks. From the controller's point
* of view, the stream is completely inert when has completed.
*/
-class StreamController<T> implements StreamSink<T> {
+class StreamController<T> extends StreamSink<T> {
+ // TODO(8997): Implement EventSink instead.
final _StreamImpl<T> stream;
/**
@@ -85,9 +86,9 @@ class StreamController<T> implements StreamSink<T> {
onPauseStateChange);
/**
- * Returns a view of this object that only exposes the [StreamSink] interface.
+ * Returns a view of this object that only exposes the [EventSink] interface.
*/
- StreamSink<T> get sink => new StreamSinkView<T>(this);
+ EventSink<T> get sink => new EventSinkView<T>(this);
/**
* Whether the stream is closed for adding more events.
@@ -120,14 +121,14 @@ class StreamController<T> implements StreamSink<T> {
* If a subscription has requested to be unsubscribed on errors,
* it will be unsubscribed after receiving this event.
*/
- void signalError(Object error, [Object stackTrace]) {
+ void addError(Object error, [Object stackTrace]) {
AsyncError asyncError;
if (error is AsyncError) {
asyncError = error;
} else {
asyncError = new AsyncError(error, stackTrace);
}
- stream._signalError(asyncError);
+ stream._addError(asyncError);
}
/**

Powered by Google App Engine
This is Rietveld 408576698