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

Unified Diff: sdk/lib/uri/uri.dart

Issue 12052038: Rename new Uri.fromString to Uri.parse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload because of Error. Created 7 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 | « sdk/lib/io/websocket_impl.dart ('k') | tests/compiler/dart2js/uri_extras_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/uri/uri.dart
diff --git a/sdk/lib/uri/uri.dart b/sdk/lib/uri/uri.dart
index 6b01a0638c58de7b883d2d7c940b1019e49af44a..1766fc14fb3fdf4459c81943bb4755aa0afd376e 100644
--- a/sdk/lib/uri/uri.dart
+++ b/sdk/lib/uri/uri.dart
@@ -24,8 +24,14 @@ class Uri {
final String query;
final String fragment;
+ /**
+ * Deprecated. Please use [parse] instead.
+ */
+ @deprecated
Uri.fromString(String uri) : this._fromMatch(_splitRe.firstMatch(uri));
+ static Uri parse(String uri) => new Uri._fromMatch(_splitRe.firstMatch(uri));
+
Uri._fromMatch(Match m) :
this.fromComponents(scheme: _emptyIfNull(m[_COMPONENT_SCHEME]),
userInfo: _emptyIfNull(m[_COMPONENT_USER_INFO]),
@@ -119,7 +125,7 @@ class Uri {
}
Uri resolve(String uri) {
- return resolveUri(new Uri.fromString(uri));
+ return resolveUri(Uri.parse(uri));
}
Uri resolveUri(Uri reference) {
« no previous file with comments | « sdk/lib/io/websocket_impl.dart ('k') | tests/compiler/dart2js/uri_extras_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698