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

Unified Diff: lib/src/no_package_resolver.dart

Issue 2132443003: Add package implementation. (Closed) Base URL: git@github.com:dart-lang/package_resolver@master
Patch Set: Code review changes 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/current_isolate_resolver.dart ('k') | lib/src/package_config_resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/no_package_resolver.dart
diff --git a/lib/src/no_package_resolver.dart b/lib/src/no_package_resolver.dart
new file mode 100644
index 0000000000000000000000000000000000000000..9d324d4cc9a3f013b2059946293398ab94091e65
--- /dev/null
+++ b/lib/src/no_package_resolver.dart
@@ -0,0 +1,34 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'async_package_resolver.dart';
+import 'package_resolver.dart';
+import 'sync_package_resolver.dart';
+import 'utils.dart';
+
+/// A package resolution strategy that is unable to resolve any `package:` URIs.
+class NoPackageResolver implements SyncPackageResolver {
+ Map<String, Uri> get packageConfigMap => null;
+ Uri get packageConfigUri => null;
+ Uri get packageRoot => null;
+ String get processArgument => null;
+
+ PackageResolver get asAsync => new AsyncPackageResolver(this);
+
+ Uri resolveUri(packageUri) {
+ // Verify that the URI is valid.
+ asPackageUri(packageUri, "packageUri");
+ return null;
+ }
+
+ Uri urlFor(String package, [String path]) => null;
+
+ Uri packageUriFor(url) {
+ // Verify that the URI is a valid type.
+ asUri(url, "url");
+ return null;
+ }
+
+ String packagePath(String package) => null;
+}
« no previous file with comments | « lib/src/current_isolate_resolver.dart ('k') | lib/src/package_config_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698