Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: net/http/http_server_properties.h

Issue 989253005: Use linked hash map for broken alternative service queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: nits. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/http/http_server_properties_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_server_properties_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698