| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library('system_cache'); |
| 6 |
| 7 #import('package.dart'); |
| 8 #import('source_registry.dart'); |
| 9 |
| 5 /** | 10 /** |
| 6 * The system-wide cache of installed packages. | 11 * The system-wide cache of installed packages. |
| 7 * | 12 * |
| 8 * This cache contains all packages that are downloaded from the internet. | 13 * This cache contains all packages that are downloaded from the internet. |
| 9 * Packages that are available locally (e.g. from the SDK) don't use this cache. | 14 * Packages that are available locally (e.g. from the SDK) don't use this cache. |
| 10 */ | 15 */ |
| 11 class SystemCache { | 16 class SystemCache { |
| 12 /** | 17 /** |
| 13 * The root directory where this package cache is located. | 18 * The root directory where this package cache is located. |
| 14 */ | 19 */ |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 throw 'Package ${id.fullName} not found in source "${id.source.name}".'; | 82 throw 'Package ${id.fullName} not found in source "${id.source.name}".'; |
| 78 } | 83 } |
| 79 return Package.load(path, sources); | 84 return Package.load(path, sources); |
| 80 }); | 85 }); |
| 81 | 86 |
| 82 always(future, () => _pendingInstalls.remove(id)); | 87 always(future, () => _pendingInstalls.remove(id)); |
| 83 _pendingInstalls[id] = future; | 88 _pendingInstalls[id] = future; |
| 84 return future; | 89 return future; |
| 85 } | 90 } |
| 86 } | 91 } |
| OLD | NEW |