Index: net/base/url_util.cc |
diff --git a/net/base/url_util.cc b/net/base/url_util.cc |
index 062481fef392c9a9b103e152f86932addb997757..00ca5cbd82e944d00d8508c1c565ef78e8c25d8e 100644 |
--- a/net/base/url_util.cc |
+++ b/net/base/url_util.cc |
@@ -371,6 +371,16 @@ bool IsLocalhost(base::StringPiece host) { |
return false; |
} |
+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); |
+} |
+ |
GURL SimplifyUrlForRequest(const GURL& url) { |
DCHECK(url.is_valid()); |
// Fast path to avoid re-canonicalization via ReplaceComponents. |