Index: url/gurl.h |
diff --git a/url/gurl.h b/url/gurl.h |
index c9111d3684992d457486ed04cb47c616396cf345..ce7e33c0181b01f5df447219f8fb5aa8f424fc7d 100644 |
--- a/url/gurl.h |
+++ b/url/gurl.h |
@@ -132,10 +132,6 @@ class URL_EXPORT GURL { |
return parsed_; |
} |
- // Defiant equality operator! |
- bool operator==(const GURL& other) const; |
- bool operator!=(const GURL& other) const; |
- |
// Allows GURL to used as a key in STL (for example, a std::set or std::map). |
bool operator<(const GURL& other) const; |
bool operator>(const GURL& other) const; |
@@ -447,4 +443,13 @@ class URL_EXPORT GURL { |
// Stream operator so GURL can be used in assertion statements. |
URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url); |
+URL_EXPORT bool operator==(const GURL& x, const GURL& y); |
+URL_EXPORT bool operator!=(const GURL& x, const GURL& y); |
+ |
+// Equality operator for comparing raw spec_. This should be used in place of |
+// url == GURL(spec) where |spec| is known (i.e. constants). This is to prevent |
+// needlessly re-parsing |spec| into a temporary GURL. |
+URL_EXPORT bool operator==(const GURL& x, const base::StringPiece& spec); |
+URL_EXPORT bool operator!=(const GURL& x, const base::StringPiece& spec); |
+ |
#endif // URL_GURL_H_ |