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

Unified Diff: sdk/lib/_internal/pub/lib/src/hosted_source.dart

Issue 16019002: Merge the dart:uri library into dart:core and update the Uri class (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final cleanup Created 7 years, 7 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 | « sdk/lib/_internal/pub/lib/src/command_uploader.dart ('k') | sdk/lib/_internal/pub/lib/src/io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/hosted_source.dart
diff --git a/sdk/lib/_internal/pub/lib/src/hosted_source.dart b/sdk/lib/_internal/pub/lib/src/hosted_source.dart
index a793f656ee065d688fae8efa7c46d7efe1a50f90..a5c99924d6ef5743978c97a69476ab543c351edb 100644
--- a/sdk/lib/_internal/pub/lib/src/hosted_source.dart
+++ b/sdk/lib/_internal/pub/lib/src/hosted_source.dart
@@ -7,7 +7,6 @@ library hosted_source;
import 'dart:async';
import 'dart:io' as io;
import 'dart:json' as json;
-import 'dart:uri';
import 'package:http/http.dart' as http;
import 'package:pathos/path.dart' as path;
@@ -214,8 +213,8 @@ String _getSourceDirectory(String url) {
Uri _makeUrl(description, String pattern(String server, String package)) {
var parsed = _parseDescription(description);
var server = parsed.last;
- var package = encodeUriComponent(parsed.first);
- return new Uri(pattern(server, package));
+ var package = Uri.encodeComponent(parsed.first);
+ return Uri.parse(pattern(server, package));
}
/// Parses [id] into its server, package name, and version components, then
@@ -225,9 +224,9 @@ Uri _makeVersionUrl(PackageId id,
String pattern(String server, String package, String version)) {
var parsed = _parseDescription(id.description);
var server = parsed.last;
- var package = encodeUriComponent(parsed.first);
- var version = encodeUriComponent(id.version.toString());
- return new Uri(pattern(server, package, version));
+ var package = Uri.encodeComponent(parsed.first);
+ var version = Uri.encodeComponent(id.version.toString());
+ return Uri.parse(pattern(server, package, version));
}
/// Parses the description for a package.
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command_uploader.dart ('k') | sdk/lib/_internal/pub/lib/src/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698