| Index: url/gurl.cc
|
| diff --git a/url/gurl.cc b/url/gurl.cc
|
| index 43f30528593ffe1a0d0ecf4a6a9e69cca8b9a956..d35a5b30d33d97ba0e8236b05fd2611bbbc768ae 100644
|
| --- a/url/gurl.cc
|
| +++ b/url/gurl.cc
|
| @@ -467,6 +467,14 @@ bool GURL::DomainIs(base::StringPiece lower_ascii_domain) const {
|
| return url::DomainIs(host_piece(), lower_ascii_domain);
|
| }
|
|
|
| +// static
|
| +bool GURL::EqualsIgnoringRef(const GURL& x, const GURL& y) {
|
| + int ref_position_x = x.parsed_.CountCharactersBefore(url::Parsed::REF, true);
|
| + int ref_position_y = y.parsed_.CountCharactersBefore(url::Parsed::REF, true);
|
| + return base::StringPiece(x.spec_).substr(0, ref_position_x) ==
|
| + base::StringPiece(y.spec_).substr(0, ref_position_y);
|
| +}
|
| +
|
| void GURL::Swap(GURL* other) {
|
| spec_.swap(other->spec_);
|
| std::swap(is_valid_, other->is_valid_);
|
|
|