| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 AlternativeService(AlternateProtocol protocol, | 93 AlternativeService(AlternateProtocol protocol, |
| 94 const std::string& host, | 94 const std::string& host, |
| 95 uint16 port) | 95 uint16 port) |
| 96 : protocol(protocol), host(host), port(port) {} | 96 : protocol(protocol), host(host), port(port) {} |
| 97 | 97 |
| 98 AlternativeService(const AlternativeService& alternative_service) = default; | 98 AlternativeService(const AlternativeService& alternative_service) = default; |
| 99 AlternativeService& operator=(const AlternativeService& alternative_service) = | 99 AlternativeService& operator=(const AlternativeService& alternative_service) = |
| 100 default; | 100 default; |
| 101 | 101 |
| 102 bool operator==(const AlternativeService& other) const { |
| 103 return protocol == other.protocol && host == other.host && |
| 104 port == other.port; |
| 105 } |
| 106 |
| 102 bool operator<(const AlternativeService& other) const { | 107 bool operator<(const AlternativeService& other) const { |
| 103 if (protocol != other.protocol) | 108 if (protocol != other.protocol) |
| 104 return protocol < other.protocol; | 109 return protocol < other.protocol; |
| 105 if (host != other.host) | 110 if (host != other.host) |
| 106 return host < other.host; | 111 return host < other.host; |
| 107 return port < other.port; | 112 return port < other.port; |
| 108 } | 113 } |
| 109 | 114 |
| 110 AlternateProtocol protocol; | 115 AlternateProtocol protocol; |
| 111 std::string host; | 116 std::string host; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 291 |
| 287 virtual const ServerNetworkStatsMap& server_network_stats_map() const = 0; | 292 virtual const ServerNetworkStatsMap& server_network_stats_map() const = 0; |
| 288 | 293 |
| 289 private: | 294 private: |
| 290 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 295 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
| 291 }; | 296 }; |
| 292 | 297 |
| 293 } // namespace net | 298 } // namespace net |
| 294 | 299 |
| 295 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 300 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| OLD | NEW |