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

Unified Diff: lib/src/resolve.dart

Issue 1612003002: Add browser-compatible version. (Closed) Base URL: https://github.com/dart-lang/resource.git@master
Patch Set: Made test run Created 4 years, 11 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/package_loader.dart ('k') | lib/src/resource.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/resolve.dart
diff --git a/lib/src/resolve.dart b/lib/src/resolve.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7a54520a84c6e9149b78cf3df5d88ea3db8e5edd
--- /dev/null
+++ b/lib/src/resolve.dart
@@ -0,0 +1,14 @@
+// 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 "dart:async" show Future;
+import "dart:isolate" show Isolate;
+
+/// Helper function for resolving to a non-relative, non-package URI.
+Future<Uri> resolveUri(Uri uri) async {
+ if (uri.scheme == "package") {
+ return Isolate.resolvePackageUri(uri);
+ }
+ return Uri.base.resolveUri(uri);
+}
« no previous file with comments | « lib/src/package_loader.dart ('k') | lib/src/resource.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698