| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "url/gurl.h" | 5 #include "url/gurl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <ostream> | 10 #include <ostream> |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 505 |
| 506 bool operator==(const GURL& x, const GURL& y) { | 506 bool operator==(const GURL& x, const GURL& y) { |
| 507 return x.possibly_invalid_spec() == y.possibly_invalid_spec(); | 507 return x.possibly_invalid_spec() == y.possibly_invalid_spec(); |
| 508 } | 508 } |
| 509 | 509 |
| 510 bool operator!=(const GURL& x, const GURL& y) { | 510 bool operator!=(const GURL& x, const GURL& y) { |
| 511 return !(x == y); | 511 return !(x == y); |
| 512 } | 512 } |
| 513 | 513 |
| 514 bool operator==(const GURL& x, const base::StringPiece& spec) { | 514 bool operator==(const GURL& x, const base::StringPiece& spec) { |
| 515 DCHECK_EQ(GURL(spec).possibly_invalid_spec(), spec); |
| 515 return x.possibly_invalid_spec() == spec; | 516 return x.possibly_invalid_spec() == spec; |
| 516 } | 517 } |
| 517 | 518 |
| 518 bool operator!=(const GURL& x, const base::StringPiece& spec) { | 519 bool operator!=(const GURL& x, const base::StringPiece& spec) { |
| 519 return !(x == spec); | 520 return !(x == spec); |
| 520 } | 521 } |
| OLD | NEW |