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

Unified Diff: utils/pub/git.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/error_group.dart ('k') | utils/pub/git_source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/git.dart
diff --git a/utils/pub/git.dart b/utils/pub/git.dart
index 53ecbe7826bde9f7d1c215d913ea514970c54bf2..8d996229779f6682e4ebe8c784317725ec8700c7 100644
--- a/utils/pub/git.dart
+++ b/utils/pub/git.dart
@@ -13,7 +13,7 @@ import 'utils.dart';
/// Tests whether or not the git command-line app is available for use.
Future<bool> get isInstalled {
if (_isGitInstalledCache != null) {
- return new Future.immediate(_isGitInstalledCache);
+ return new Future.value(_isGitInstalledCache);
}
return _gitCommand.then((git) => git != null);
@@ -44,7 +44,7 @@ String _gitCommandCache;
/// found on the user's PATH.
Future<String> get _gitCommand {
if (_gitCommandCache != null) {
- return new Future.immediate(_gitCommandCache);
+ return new Future.value(_gitCommandCache);
}
return _tryGitCommand("git").then((success) {
« no previous file with comments | « utils/pub/error_group.dart ('k') | utils/pub/git_source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698