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

Unified Diff: sdk/lib/async/broadcast_stream_controller.dart

Issue 2762953003: More minor type improvements in dart:async. (Closed)
Patch Set: More fixes. Created 3 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
« no previous file with comments | « sdk/lib/async/async_error.dart ('k') | sdk/lib/async/future.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/broadcast_stream_controller.dart
diff --git a/sdk/lib/async/broadcast_stream_controller.dart b/sdk/lib/async/broadcast_stream_controller.dart
index 075386102069ffcbbd4ffb21c3e920233de4f82b..198f96cb2bb969342703f9ece4944aaffc25b5e3 100644
--- a/sdk/lib/async/broadcast_stream_controller.dart
+++ b/sdk/lib/async/broadcast_stream_controller.dart
@@ -514,31 +514,3 @@ class _AsBroadcastStreamController<T> extends _SyncBroadcastStreamController<T>
super._callOnCancel();
}
}
-
-// A subscription that never receives any events.
-// It can simulate pauses, but otherwise does nothing.
-class _DoneSubscription<T> implements StreamSubscription<T> {
- int _pauseCount = 0;
- void onData(void handleData(T data)) {}
- void onError(Function handleError) {}
- void onDone(void handleDone()) {}
- void pause([Future resumeSignal]) {
- if (resumeSignal != null) resumeSignal.then(_resume);
- _pauseCount++;
- }
-
- void resume() {
- _resume(null);
- }
-
- void _resume(_) {
- if (_pauseCount > 0) _pauseCount--;
- }
-
- Future cancel() {
- return new _Future.immediate(null);
- }
-
- bool get isPaused => _pauseCount > 0;
- Future<E> asFuture<E>([E value]) => new _Future<E>();
-}
« no previous file with comments | « sdk/lib/async/async_error.dart ('k') | sdk/lib/async/future.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698