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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 |
106 static bool FromString(const std::string& str, | |
107 AlternativeService* alternative_service); | |
Ryan Hamilton
2017/06/12 18:57:32
Is this being added in order to support the serial
wangyix1
2017/06/14 00:01:25
Yes.
| |
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
340 // Returns whether HttpServerProperties is initialized. | 343 // Returns whether HttpServerProperties is initialized. |
341 virtual bool IsInitialized() const = 0; | 344 virtual bool IsInitialized() const = 0; |
342 | 345 |
343 private: | 346 private: |
344 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 347 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
345 }; | 348 }; |
346 | 349 |
347 } // namespace net | 350 } // namespace net |
348 | 351 |
349 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 352 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
OLD | NEW |