Chromium Code Reviews| Index: content/public/common/url_utils.cc |
| diff --git a/content/public/common/url_utils.cc b/content/public/common/url_utils.cc |
| index 5ca69aa84a436a5ae3ecfd15e2ee14e864236c61..d477af3af6c1d3a2a879af784b6535204550a04e 100644 |
| --- a/content/public/common/url_utils.cc |
| +++ b/content/public/common/url_utils.cc |
| @@ -23,4 +23,19 @@ bool IsSavableURL(const GURL& url) { |
| return false; |
| } |
| +bool IsAboutBlankURL(const GURL& url) { |
| + if (!url.SchemeIs(url::kAboutScheme)) |
| + return false; |
| + |
| + if (url.has_host() || url.has_username() || url.has_password() || |
| + url.has_port()) { |
| + return false; |
| + } |
| + |
| + if (url.path() != kAboutBlankPath && url.path() !=kAboutBlankWithHashPath) |
|
Charlie Reis
2017/01/19 22:36:35
nit: Space after !=
clamy
2017/01/20 12:51:53
Done.
|
| + return false; |
| + |
| + return true; |
| +} |
| + |
| } // namespace content |