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

Unified Diff: package_config/lib/packages.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 | « package_config/lib/discovery_analysis.dart ('k') | package_config/lib/packages_file.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: package_config/lib/packages.dart
diff --git a/package_config/lib/packages.dart b/package_config/lib/packages.dart
deleted file mode 100644
index dbaa06dfd92e6741038c50b482da38927f444f4b..0000000000000000000000000000000000000000
--- a/package_config/lib/packages.dart
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2015, 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.
-
-library package_config.packages;
-
-import "src/packages_impl.dart";
-
-/// A package resolution strategy.
-///
-/// Allows converting a `package:` URI to a different kind of URI.
-///
-/// May also allow listing the available packages and converting
-/// to a `Map<String, Uri>` that gives the base location of each available
-/// package. In some cases there is no way to find the available packages,
-/// in which case [packages] and [asMap] will throw if used.
-/// One such case is if the packages are resolved relative to a
-/// `packages/` directory available over HTTP.
-abstract class Packages {
-
- /// A [Packages] resolver containing no packages.
- ///
- /// This constant object is returned by [find] above if no
- /// package resolution strategy is found.
- static const Packages noPackages = const NoPackages();
-
- /// Resolve a package URI into a non-package URI.
- ///
- /// Translates a `package:` URI, according to the package resolution
- /// strategy, into a URI that can be loaded.
- /// By default, only `file`, `http` and `https` URIs are returned.
- /// Custom `Packages` objects may return other URIs.
- ///
- /// If resolution fails because a package with the requested package name
- /// is not available, the [notFound] function is called.
- /// If no `notFound` function is provided, it defaults to throwing an error.
- ///
- /// The [packageUri] must be a valid package URI.
- Uri resolve(Uri packageUri, {Uri notFound(Uri packageUri)});
-
- /// Return the names of the available packages.
- ///
- /// Returns an iterable that allows iterating the names of available packages.
- ///
- /// Some `Packages` objects are unable to find the package names,
- /// and getting `packages` from such a `Packages` object will throw.
- Iterable<String> get packages;
-
- /// Return the names-to-base-URI mapping of the available packages.
- ///
- /// Returns a map from package name to a base URI.
- /// The [resolve] method will resolve a package URI with a specific package
- /// name to a path extending the base URI that this map gives for that
- /// package name.
- ///
- /// Some `Packages` objects are unable to find the package names,
- /// and calling `asMap` on such a `Packages` object will throw.
- Map<String, Uri> asMap();
-}
« no previous file with comments | « package_config/lib/discovery_analysis.dart ('k') | package_config/lib/packages_file.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698