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

Unified Diff: sdk/lib/io/directory_impl.dart

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. 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
« no previous file with comments | « sdk/lib/indexed_db/dartium/indexed_db_dartium.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/directory_impl.dart
diff --git a/sdk/lib/io/directory_impl.dart b/sdk/lib/io/directory_impl.dart
index 6b6cc38272ff92b887407bc297321441e6f59f97..3aaf2194d51ee9a1cefb4b0204dfa2c0d19eb01b 100644
--- a/sdk/lib/io/directory_impl.dart
+++ b/sdk/lib/io/directory_impl.dart
@@ -64,14 +64,14 @@ class _Directory implements Directory {
} else {
future = future.then((index) {
if (index != notFound) {
- return new Future.immediate(index);
+ return new Future.value(index);
}
return dirsToCreate[i].exists().then((e) => e ? i : notFound);
});
}
}
if (future == null) {
- return new Future.immediate(notFound);
+ return new Future.value(notFound);
} else {
return future;
}
@@ -100,7 +100,7 @@ class _Directory implements Directory {
}
}
if (future == null) {
- return new Future.immediate(this);
+ return new Future.value(this);
} else {
return future.then((_) => this);
}
« no previous file with comments | « sdk/lib/indexed_db/dartium/indexed_db_dartium.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698