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

Unified Diff: sdk/lib/io/file_impl.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/file_impl.dart
diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
index 761a794400c0436e31119c5a7bc4bed435cae339..c5d77ec4f9df2875264e5258671c3596f5e82628 100644
--- a/sdk/lib/io/file_impl.dart
+++ b/sdk/lib/io/file_impl.dart
@@ -576,12 +576,12 @@ class _File extends _FileBase implements File {
return open(mode).then((file) {
var controller = new StreamController();
- var subscription = controller.subscribe();
- subscription.onData((data) {
- // TODO(ajohnsen): handle errors correctly.
- file.writeList(data, 0, data.length);
- });
- subscription.onDone(file.close);
+ var subscription = controller.listen(
+ (data) {
+ // TODO(ajohnsen): handle errors correctly.
+ file.writeList(data, 0, data.length);
+ },
+ onDone: file.close);
return controller.sink;
});

Powered by Google App Engine
This is Rietveld 408576698