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

Unified Diff: sdk/lib/io/stream_util.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/stream_util.dart
diff --git a/sdk/lib/io/stream_util.dart b/sdk/lib/io/stream_util.dart
index 7487f0f705c40c962bcaca40ed28919ab0967e6a..2e4ed2f6650d530eea76293a30d0da802e345796 100644
--- a/sdk/lib/io/stream_util.dart
+++ b/sdk/lib/io/stream_util.dart
@@ -219,24 +219,24 @@ class _InputStreamController extends StreamController<List<int>> {
void onPauseStateChange() {
if (isPaused) {
- unlisten();
+ _unlisten();
} else {
- listen();
+ _listen();
}
}
void onSubscriptionStateChange() {
- if (hasSubscribers) listen();
+ if (hasSubscribers) _listen();
// TODO(ajohnsen): Else destroy?
}
- void listen() {
+ void _listen() {
_inputStream.onData = () {
add(_inputStream.read());
};
}
- void unlisten() {
+ void _unlisten() {
_inputStream.onData = null;
}

Powered by Google App Engine
This is Rietveld 408576698