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

Unified Diff: utils/pub/source.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 | « utils/pub/pub.dart ('k') | utils/pub/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/source.dart
diff --git a/utils/pub/source.dart b/utils/pub/source.dart
index adb95714279c87adc8fc5484255916918eae5bca..b5e5d53132c02cc9a883bdd966684630ee046325 100644
--- a/utils/pub/source.dart
+++ b/utils/pub/source.dart
@@ -154,7 +154,7 @@ abstract class Source {
///
/// This doesn't need to be implemented if [shouldCache] is false.
Future<String> systemCacheDirectory(PackageId id) {
- return new Future.immediateError(
+ return new Future.error(
"systemCacheDirectory() must be implemented if shouldCache is true.");
}
@@ -206,7 +206,7 @@ abstract class Source {
/// [descriptionsEqual].
///
/// By default, this just returns [id].
- Future<PackageId> resolveId(PackageId id) => new Future.immediate(id);
+ Future<PackageId> resolveId(PackageId id) => new Future.value(id);
/// Returns the [Package]s that have been installed in the system cache.
List<Package> getCachedPackages() {
« no previous file with comments | « utils/pub/pub.dart ('k') | utils/pub/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698