OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_QUIC_QUIC_SERVER_ID_H_ | 5 #ifndef NET_QUIC_QUIC_SERVER_ID_H_ |
6 #define NET_QUIC_QUIC_SERVER_ID_H_ | 6 #define NET_QUIC_QUIC_SERVER_ID_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "net/base/host_port_pair.h" | 10 #include "net/base/host_port_pair.h" |
11 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
12 #include "net/base/privacy_mode.h" | 12 #include "net/base/privacy_mode.h" |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 // The id used to identify sessions. Includes the hostname, port, scheme and | 16 // The id used to identify sessions. Includes the hostname, port, scheme and |
17 // privacy_mode. | 17 // privacy_mode. |
18 class NET_EXPORT_PRIVATE QuicServerId { | 18 class NET_EXPORT_PRIVATE QuicServerId { |
19 public: | 19 public: |
20 QuicServerId(); | 20 QuicServerId(); |
21 QuicServerId(const HostPortPair& host_port_pair, | 21 QuicServerId(const HostPortPair& host_port_pair, |
22 bool is_https, | 22 bool is_https, |
23 PrivacyMode privacy_mode); | 23 PrivacyMode privacy_mode); |
24 QuicServerId(const std::string& host, | 24 QuicServerId(const std::string& host, uint16 port, bool is_https); |
25 uint16 port, | |
26 bool is_https); | |
27 QuicServerId(const std::string& host, | 25 QuicServerId(const std::string& host, |
28 uint16 port, | 26 uint16 port, |
29 bool is_https, | 27 bool is_https, |
30 PrivacyMode privacy_mode); | 28 PrivacyMode privacy_mode); |
31 ~QuicServerId(); | 29 ~QuicServerId(); |
32 | 30 |
33 // Needed to be an element of std::set. | 31 // Needed to be an element of std::set. |
34 bool operator<(const QuicServerId& other) const; | 32 bool operator<(const QuicServerId& other) const; |
35 bool operator==(const QuicServerId& other) const; | 33 bool operator==(const QuicServerId& other) const; |
36 | 34 |
(...skipping 14 matching lines...) Expand all Loading... |
51 | 49 |
52 private: | 50 private: |
53 HostPortPair host_port_pair_; | 51 HostPortPair host_port_pair_; |
54 bool is_https_; | 52 bool is_https_; |
55 PrivacyMode privacy_mode_; | 53 PrivacyMode privacy_mode_; |
56 }; | 54 }; |
57 | 55 |
58 } // namespace net | 56 } // namespace net |
59 | 57 |
60 #endif // NET_QUIC_QUIC_SERVER_ID_H_ | 58 #endif // NET_QUIC_QUIC_SERVER_ID_H_ |
OLD | NEW |