| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 AlternativeService(AlternateProtocol protocol, | 104 AlternativeService(AlternateProtocol protocol, |
| 105 const HostPortPair& host_port_pair) | 105 const HostPortPair& host_port_pair) |
| 106 : protocol(protocol), | 106 : protocol(protocol), |
| 107 host(host_port_pair.host()), | 107 host(host_port_pair.host()), |
| 108 port(host_port_pair.port()) {} | 108 port(host_port_pair.port()) {} |
| 109 | 109 |
| 110 AlternativeService(const AlternativeService& alternative_service) = default; | 110 AlternativeService(const AlternativeService& alternative_service) = default; |
| 111 AlternativeService& operator=(const AlternativeService& alternative_service) = | 111 AlternativeService& operator=(const AlternativeService& alternative_service) = |
| 112 default; | 112 default; |
| 113 | 113 |
| 114 HostPortPair host_port_pair() { return HostPortPair(host, port); } | 114 HostPortPair host_port_pair() const { return HostPortPair(host, port); } |
| 115 | 115 |
| 116 bool operator==(const AlternativeService& other) const { | 116 bool operator==(const AlternativeService& other) const { |
| 117 return protocol == other.protocol && host == other.host && | 117 return protocol == other.protocol && host == other.host && |
| 118 port == other.port; | 118 port == other.port; |
| 119 } | 119 } |
| 120 | 120 |
| 121 bool operator<(const AlternativeService& other) const { | 121 bool operator<(const AlternativeService& other) const { |
| 122 if (protocol != other.protocol) | 122 if (protocol != other.protocol) |
| 123 return protocol < other.protocol; | 123 return protocol < other.protocol; |
| 124 if (host != other.host) | 124 if (host != other.host) |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 314 |
| 315 virtual const ServerNetworkStatsMap& server_network_stats_map() const = 0; | 315 virtual const ServerNetworkStatsMap& server_network_stats_map() const = 0; |
| 316 | 316 |
| 317 private: | 317 private: |
| 318 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 318 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 } // namespace net | 321 } // namespace net |
| 322 | 322 |
| 323 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 323 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| OLD | NEW |