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

Unified Diff: lib/src/source_registry.dart

Issue 2174913002: Add an SDK source. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 4 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
« no previous file with comments | « lib/src/source/sdk.dart ('k') | lib/src/system_cache.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/source_registry.dart
diff --git a/lib/src/source_registry.dart b/lib/src/source_registry.dart
index be49746dc0b3eb824342b7c2aaaef6e74fdf1d3c..9fffff49b2e92be8477ad194173511296b400868 100644
--- a/lib/src/source_registry.dart
+++ b/lib/src/source_registry.dart
@@ -6,6 +6,7 @@ import 'source.dart';
import 'source/git.dart';
import 'source/hosted.dart';
import 'source/path.dart';
+import 'source/sdk.dart';
import 'source/unknown.dart';
/// A class that keeps track of [Source]s used for getting packages.
@@ -16,7 +17,8 @@ class SourceRegistry {
final _sources = {
"git": new GitSource(),
"hosted": new HostedSource(),
- "path": new PathSource()
+ "path": new PathSource(),
+ "sdk": new SdkSource()
};
/// The default source, which is used when no source is specified.
@@ -41,6 +43,9 @@ class SourceRegistry {
/// The built-in [PathSource].
PathSource get path => _sources["path"] as PathSource;
+ /// The built-in [SdkSource].
+ SdkSource get sdk => _sources["sdk"] as SdkSource;
+
SourceRegistry() {
_default = hosted;
}
« no previous file with comments | « lib/src/source/sdk.dart ('k') | lib/src/system_cache.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698