Index: url/url_util.cc |
diff --git a/url/url_util.cc b/url/url_util.cc |
index 9a2cce47aa116c047e8d49cc6235941be944075d..ef3f72fa8cef6d666dd8fae79468d9c6d71514ef 100644 |
--- a/url/url_util.cc |
+++ b/url/url_util.cc |
@@ -683,6 +683,16 @@ bool HostIsIPAddress(base::StringPiece host) { |
return host_info.IsIPAddress(); |
} |
+bool IsFragmentAddedOrUpdated(const GURL& old_url, const GURL& new_url) { |
+ if (!new_url.has_ref() || old_url == new_url) |
+ return false; |
+ |
+ url::Replacements<char> replacements; |
+ replacements.ClearRef(); |
+ return old_url.ReplaceComponents(replacements) == |
+ new_url.ReplaceComponents(replacements); |
+} |
+ |
bool Canonicalize(const char* spec, |
int spec_len, |
bool trim_path_end, |