Chromium Code Reviews| Index: third_party/WebKit/Source/platform/weborigin/KURL.cpp |
| diff --git a/third_party/WebKit/Source/platform/weborigin/KURL.cpp b/third_party/WebKit/Source/platform/weborigin/KURL.cpp |
| index 99af364f9470dda7bd7c13faab6132cfc5205bff..82d9297678681913f1a6102419f044b48e6aee0e 100644 |
| --- a/third_party/WebKit/Source/platform/weborigin/KURL.cpp |
| +++ b/third_party/WebKit/Source/platform/weborigin/KURL.cpp |
| @@ -721,6 +721,24 @@ bool equalIgnoringFragmentIdentifier(const KURL& a, const KURL& b) |
| return true; |
| } |
| +bool equalIgnoringPathQueryAndFragment(const KURL& a, const KURL& b) |
| +{ |
| + int aLength = a.pathStart(); |
| + int bLength = b.pathStart(); |
| + |
| + if (aLength != bLength) |
| + return false; |
| + |
| + const String& aString = a.m_string; |
| + const String& bString = b.m_string; |
| + // FIXME: Abstraction this into a function in WTFString.h. |
|
brettw
2015/12/08 05:41:32
I would remove this FIXME, I don't think this shou
robwu
2015/12/08 08:45:17
Then it also applies to the function above. In eit
|
| + for (int i = 0; i < aLength; ++i) { |
| + if (aString[i] != bString[i]) |
| + return false; |
| + } |
| + return true; |
| +} |
| + |
| unsigned KURL::hostStart() const |
| { |
| return m_parsed.CountCharactersBefore(url::Parsed::HOST, false); |