| Index: url/url_util.cc
|
| diff --git a/url/url_util.cc b/url/url_util.cc
|
| index 2c8d6978cb72c5c7665135bcd9d7a36e7941be77..9a2cce47aa116c047e8d49cc6235941be944075d 100644
|
| --- a/url/url_util.cc
|
| +++ b/url/url_util.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/debug/leak_annotations.h"
|
| #include "base/logging.h"
|
| #include "base/strings/string_util.h"
|
| +#include "url/gurl.h"
|
| #include "url/url_canon_internal.h"
|
| #include "url/url_constants.h"
|
| #include "url/url_file.h"
|
| @@ -608,6 +609,21 @@ bool IsReferrerScheme(const char* spec, const Component& scheme) {
|
| return DoIsInSchemes(spec, scheme, &unused_scheme_type, *referrer_schemes);
|
| }
|
|
|
| +bool IsAboutBlank(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)
|
| + return false;
|
| +
|
| + return true;
|
| +}
|
| +
|
| bool FindAndCompareScheme(const char* str,
|
| int str_len,
|
| const char* compare,
|
|
|