Index: url/gurl.h |
diff --git a/url/gurl.h b/url/gurl.h |
index c9111d3684992d457486ed04cb47c616396cf345..ed7a5896c4ed0f392f9c5abe522025a67b7501a0 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,14 @@ 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); |
+// Defiant equality operator! |
brettw
2016/10/17 22:58:59
I think this weird comment can be removed now. I t
|
+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_ |