Index: url/gurl.cc |
diff --git a/url/gurl.cc b/url/gurl.cc |
index f521692f931da535b50bc5b48aef21d71a6e9ba7..be268a59fd31bec6f7543a64021e2a0dd26964a2 100644 |
--- a/url/gurl.cc |
+++ b/url/gurl.cc |
@@ -348,6 +348,20 @@ bool GURL::IsStandard() const { |
return url::IsStandard(spec_.data(), parsed_.scheme); |
} |
+bool GURL::IsAboutBlank() const { |
+ if (!SchemeIs(url::kAboutScheme)) |
+ return false; |
+ |
+ if (has_host() || has_username() || has_password() || has_port()) { |
brettw
2017/02/09 20:30:28
Remove {} for consistency.
clamy
2017/02/10 13:17:22
Done.
|
+ return false; |
+ } |
+ |
+ if (path() != url::kAboutBlankPath && path() != url::kAboutBlankWithHashPath) |
+ return false; |
+ |
+ return true; |
+} |
+ |
bool GURL::SchemeIs(base::StringPiece lower_ascii_scheme) const { |
DCHECK(base::IsStringASCII(lower_ascii_scheme)); |
DCHECK(base::ToLowerASCII(lower_ascii_scheme) == lower_ascii_scheme); |