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

Unified Diff: utils/pub/utils.dart

Issue 12150006: Fix a few breakages with Pub's oauth2 test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « no previous file | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/utils.dart
diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart
index 7e91b43801528ccd11ba72d2695f1b420b1efd0b..8617f2071bb24ef45801dbd702d3c21b4b967e1b 100644
--- a/utils/pub/utils.dart
+++ b/utils/pub/utils.dart
@@ -137,9 +137,9 @@ Future streamFirst(Stream stream) {
/// Returns a wrapped version of [stream] along with a [StreamSubscription] that
/// can be used to control the wrapped stream.
Pair<Stream, StreamSubscription> streamWithSubscription(Stream stream) {
- var controller = stream.isSingleSubscription ?
- new StreamController() :
- new StreamController.multiSubscription();
+ var controller = stream.isBroadcast ?
+ new StreamController.broadcast() :
+ new StreamController();
var subscription = stream.listen(controller.add,
onError: controller.signalError,
onDone: controller.close);
« no previous file with comments | « no previous file | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698