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

Unified Diff: utils/pub/system_cache.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/source.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/system_cache.dart
diff --git a/utils/pub/system_cache.dart b/utils/pub/system_cache.dart
index abd23482441d3e8634b0c7e76bc8385ef036ecd1..5b00dc301b6415bab3992b546f426860213de86b 100644
--- a/utils/pub/system_cache.dart
+++ b/utils/pub/system_cache.dart
@@ -5,6 +5,7 @@
library system_cache;
import 'dart:io';
+import 'dart:async';
import 'git_source.dart';
import 'hosted_source.dart';
@@ -83,7 +84,7 @@ class SystemCache {
/// temp directory to ensure that it's on the same volume as the pub system
/// cache so that it can move the directory from it.
Future<Directory> createTempDir() {
- return ensureDir(tempDir).chain((temp) {
+ return ensureDir(tempDir).then((temp) {
return io.createTempDir(join(temp, 'dir'));
});
}
@@ -91,7 +92,7 @@ class SystemCache {
/// Delete's the system cache's internal temp directory.
Future deleteTempDir() {
log.fine('Clean up system cache temp directory $tempDir.');
- return dirExists(tempDir).chain((exists) {
+ return dirExists(tempDir).then((exists) {
if (!exists) return new Future.immediate(null);
return deleteDir(tempDir);
});
« no previous file with comments | « utils/pub/source.dart ('k') | utils/pub/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698