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

Unified Diff: utils/pub/repo_source.dart

Issue 10749014: Refactor Source to take the system cache as a parameter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge Created 8 years, 5 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
Index: utils/pub/repo_source.dart
diff --git a/utils/pub/repo_source.dart b/utils/pub/repo_source.dart
index 86812e54f282d8ec311dec7feaa5c10b06bd9556..42b95960761cd7d3217ea2c74498ce8531f23462 100644
--- a/utils/pub/repo_source.dart
+++ b/utils/pub/repo_source.dart
@@ -51,13 +51,13 @@ class RepoSource extends Source {
* subdirectories then contains a subdirectory for each package installed from
* that repository.
*/
- String systemCacheDirectory(PackageId id, String parent) {
+ String systemCacheDirectory(PackageId id) {
var parsed = _parseDescription(id.description);
var url = parsed.last.replaceAll(new RegExp(@"^https?://"), "");
var urlDir = replace(url, new RegExp(@'[<>:"\\/|?*%]'), (match) {
return '%${match[0].charCodeAt(0)}';
});
- return join(parent, urlDir, "${parsed.first}-${id.version}");
+ return join(systemCacheRoot, urlDir, "${parsed.first}-${id.version}");
}
String packageName(description) => _parseDescription(description).first;
« no previous file with comments | « utils/pub/pub.dart ('k') | utils/pub/source.dart » ('j') | utils/pub/system_cache.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698