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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 } | 95 } |
96 | 96 |
97 bool operator!=(const AlternativeService& other) const { | 97 bool operator!=(const AlternativeService& other) const { |
98 return !this->operator==(other); | 98 return !this->operator==(other); |
99 } | 99 } |
100 | 100 |
101 bool operator<(const AlternativeService& other) const { | 101 bool operator<(const AlternativeService& other) const { |
102 return std::tie(protocol, host, port) < | 102 return std::tie(protocol, host, port) < |
103 std::tie(other.protocol, other.host, other.port); | 103 std::tie(other.protocol, other.host, other.port); |
104 } | 104 } |
105 | 105 |
Zhongyi Shi
2017/06/16 04:17:09
Is this method meant to parse the alternative serv
wangyix1
2017/06/16 18:41:15
Yes, that's what it does.
Done.
| |
106 static bool FromString(const std::string& str, | |
107 AlternativeService* alternative_service); | |
108 | |
106 std::string ToString() const; | 109 std::string ToString() const; |
107 | 110 |
108 NextProto protocol; | 111 NextProto protocol; |
109 std::string host; | 112 std::string host; |
110 uint16_t port; | 113 uint16_t port; |
111 }; | 114 }; |
112 | 115 |
113 NET_EXPORT_PRIVATE std::ostream& operator<<( | 116 NET_EXPORT_PRIVATE std::ostream& operator<<( |
114 std::ostream& os, | 117 std::ostream& os, |
115 const AlternativeService& alternative_service); | 118 const AlternativeService& alternative_service); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
361 // Returns whether HttpServerProperties is initialized. | 364 // Returns whether HttpServerProperties is initialized. |
362 virtual bool IsInitialized() const = 0; | 365 virtual bool IsInitialized() const = 0; |
363 | 366 |
364 private: | 367 private: |
365 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 368 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
366 }; | 369 }; |
367 | 370 |
368 } // namespace net | 371 } // namespace net |
369 | 372 |
370 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 373 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
OLD | NEW |