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

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

Issue 12254010: Make Uri.isAbsolute and Uri.hasAuthority getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/compiler/implementation/library_loader.dart ('k') | tests/utils/uri_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 3b1af612c3a70aef9e8e00fc12b8ebcc2e3a6936..abd1223f226ff93467e3215e7cb9f9542bd89bf7 100644
--- a/sdk/lib/uri/uri.dart
+++ b/sdk/lib/uri/uri.dart
@@ -92,7 +92,7 @@ class Uri {
/**
* Returns `true` if the URI is absolute.
*/
- bool isAbsolute() {
+ bool get isAbsolute {
if ("" == scheme) return false;
if ("" != fragment) return false;
return true;
@@ -143,7 +143,7 @@ class Uri {
targetPath = removeDotSegments(reference.path);
targetQuery = reference.query;
} else {
- if (reference.hasAuthority()) {
+ if (reference.hasAuthority) {
targetUserInfo = reference.userInfo;
targetDomain = reference.domain;
targetPort = reference.port;
@@ -180,7 +180,7 @@ class Uri {
fragment: reference.fragment);
}
- bool hasAuthority() {
+ bool get hasAuthority {
return (userInfo != "") || (domain != "") || (port != 0);
}
@@ -219,7 +219,7 @@ class Uri {
String toString() {
StringBuffer sb = new StringBuffer();
_addIfNonEmpty(sb, scheme, scheme, ':');
- if (hasAuthority() || (scheme == "file")) {
+ if (hasAuthority || (scheme == "file")) {
sb.add("//");
_addIfNonEmpty(sb, userInfo, userInfo, "@");
sb.add(domain == null ? "null" : domain);
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/library_loader.dart ('k') | tests/utils/uri_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698