| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef URL_SCHEME_HOST_PORT_H_ | 5 #ifndef URL_SCHEME_HOST_PORT_H_ |
| 6 #define URL_SCHEME_HOST_PORT_H_ | 6 #define URL_SCHEME_HOST_PORT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 std::string Serialize() const; | 109 std::string Serialize() const; |
| 110 | 110 |
| 111 // Two SchemeHostPort objects are "equal" iff their schemes, hosts, and ports | 111 // Two SchemeHostPort objects are "equal" iff their schemes, hosts, and ports |
| 112 // are exact matches. | 112 // are exact matches. |
| 113 // | 113 // |
| 114 // Note that this comparison is _not_ the same as an origin-based comparison. | 114 // Note that this comparison is _not_ the same as an origin-based comparison. |
| 115 // In particular, invalid SchemeHostPort objects match each other (and | 115 // In particular, invalid SchemeHostPort objects match each other (and |
| 116 // themselves). Unique origins, on the other hand, would not. | 116 // themselves). Unique origins, on the other hand, would not. |
| 117 bool Equals(const SchemeHostPort& other) const; | 117 bool Equals(const SchemeHostPort& other) const; |
| 118 | 118 |
| 119 // Allows SchemeHostPort to used as a key in STL (for example, a std::set or | 119 // Allows SchemeHostPort to be used as a key in STL (for example, a std::set |
| 120 // std::map). | 120 // or std::map). |
| 121 bool operator<(const SchemeHostPort& other) const; | 121 bool operator<(const SchemeHostPort& other) const; |
| 122 | 122 |
| 123 private: | 123 private: |
| 124 std::string scheme_; | 124 std::string scheme_; |
| 125 std::string host_; | 125 std::string host_; |
| 126 uint16 port_; | 126 uint16 port_; |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 } // namespace url | 129 } // namespace url |
| 130 | 130 |
| 131 #endif // URL_SCHEME_HOST_PORT_H_ | 131 #endif // URL_SCHEME_HOST_PORT_H_ |
| OLD | NEW |