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

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

Issue 11740027: Rename unsubscribe to cancel. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Fix error message. Created 7 years, 12 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 37437c041b2e989224f5162818cefd114baefe93..b3eb83ca3eebf14184dea30f14c85028c01dffb4 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -241,14 +241,14 @@ class _StreamingHttpRequestResponseBase extends _HttpRequestResponseBase {
_StreamingHttpRequestResponseBase(_HttpConnectionBase connection)
: super(connection);
- StreamSubscription<T> subscribe({void onData(T event),
- void onError(AsyncError error),
- void onDone(),
- bool unsubscribeOnError}) {
- return _controller.stream.subscribe(onData: onData,
- onError: onError,
- onDone: onDone,
- unsubscribeOnError: unsubscribeOnError);
+ StreamSubscription<T> listen(void onData(T event),
+ { void onError(AsyncError error),
+ void onDone(),
+ bool unsubscribeOnError}) {
+ return _controller.stream.listen(onData,
+ onError: onError,
+ onDone: onDone,
+ unsubscribeOnError: unsubscribeOnError);
}
Stream transform({void onData(T data, StreamSink sink),

Powered by Google App Engine
This is Rietveld 408576698