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

Unified Diff: utils/pub/io.dart

Issue 14251013: Rename unsubscribeOnError to cancelOnError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index 50889289ab1edc7dba6a6a548f353b4d76cf0664..f40982dcb344dc9e4cac5da007ac3a5f38761028 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -343,17 +343,17 @@ Pair<EventSink, Future> consumerToSink(StreamConsumer consumer) {
/// true.
///
/// When an error occurs on [stream], that error is passed to [sink]. If
-/// [unsubscribeOnError] is true, [Future] will be completed successfully and no
+/// [cancelOnError] is true, [Future] will be completed successfully and no
/// more data or errors will be piped from [stream] to [sink]. If
-/// [unsubscribeOnError] and [closeSink] are both true, [sink] will then be
+/// [cancelOnError] and [closeSink] are both true, [sink] will then be
/// closed.
Future store(Stream stream, EventSink sink,
- {bool unsubscribeOnError: true, closeSink: true}) {
+ {bool cancelOnError: true, closeSink: true}) {
var completer = new Completer();
stream.listen(sink.add,
onError: (e) {
sink.addError(e);
- if (unsubscribeOnError) {
+ if (cancelOnError) {
completer.complete();
if (closeSink) sink.close();
}
@@ -361,7 +361,7 @@ Future store(Stream stream, EventSink sink,
onDone: () {
if (closeSink) sink.close();
completer.complete();
- }, unsubscribeOnError: unsubscribeOnError);
+ }, cancelOnError: cancelOnError);
return completer.future;
}

Powered by Google App Engine
This is Rietveld 408576698