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

Unified Diff: third_party/pkg/barback-0.13.0/lib/src/utils.dart

Issue 291843011: Run pub tests against older versions of barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 7 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: third_party/pkg/barback-0.13.0/lib/src/utils.dart
diff --git a/pkg/barback/lib/src/utils.dart b/third_party/pkg/barback-0.13.0/lib/src/utils.dart
similarity index 93%
copy from pkg/barback/lib/src/utils.dart
copy to third_party/pkg/barback-0.13.0/lib/src/utils.dart
index d5a9fb62dd1130684c73390fd2904d7f7ccafbff..d2ce0495130b728187dd9e26d5247766e91a206f 100644
--- a/pkg/barback/lib/src/utils.dart
+++ b/third_party/pkg/barback-0.13.0/lib/src/utils.dart
@@ -308,20 +308,3 @@ Stream callbackStream(Stream callback()) {
sync: true);
return controller.stream;
}
-
-/// Creates a single-subscription stream from a broadcast stream.
-///
-/// The returned stream will enqueue events from [broadcast] until a listener is
-/// attached, then pipe events to that listener.
-Stream broadcastToSingleSubscription(Stream broadcast) {
- if (!broadcast.isBroadcast) return broadcast;
-
- // TODO(nweiz): Implement this using a transformer when issues 18588 and 18586
- // are fixed.
- var subscription;
- var controller = new StreamController(onCancel: () => subscription.cancel());
- subscription = broadcast.listen(controller.add,
- onError: controller.addError,
- onDone: controller.close);
- return controller.stream;
-}
« no previous file with comments | « third_party/pkg/barback-0.13.0/lib/src/transformer_group.dart ('k') | third_party/pkg/barback-0.13.0/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698