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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 return; | 168 return; |
169 | 169 |
170 advertised_versions_ = advertised_versions; | 170 advertised_versions_ = advertised_versions; |
171 std::sort(advertised_versions_.begin(), advertised_versions_.end()); | 171 std::sort(advertised_versions_.begin(), advertised_versions_.end()); |
172 } | 172 } |
173 | 173 |
174 const AlternativeService& alternative_service() const { | 174 const AlternativeService& alternative_service() const { |
175 return alternative_service_; | 175 return alternative_service_; |
176 } | 176 } |
177 | 177 |
| 178 NextProto protocol() const { return alternative_service_.protocol; } |
| 179 |
| 180 HostPortPair host_port_pair() const { |
| 181 return alternative_service_.host_port_pair(); |
| 182 } |
| 183 |
178 base::Time expiration() const { return expiration_; } | 184 base::Time expiration() const { return expiration_; } |
179 | 185 |
180 const QuicVersionVector& advertised_versions() const { | 186 const QuicVersionVector& advertised_versions() const { |
181 return advertised_versions_; | 187 return advertised_versions_; |
182 } | 188 } |
183 | 189 |
184 private: | 190 private: |
185 AlternativeServiceInfo(const AlternativeService& alternative_service, | 191 AlternativeServiceInfo(const AlternativeService& alternative_service, |
186 base::Time expiration, | 192 base::Time expiration, |
187 const QuicVersionVector& advertised_versions); | 193 const QuicVersionVector& advertised_versions); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 // Returns whether HttpServerProperties is initialized. | 407 // Returns whether HttpServerProperties is initialized. |
402 virtual bool IsInitialized() const = 0; | 408 virtual bool IsInitialized() const = 0; |
403 | 409 |
404 private: | 410 private: |
405 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 411 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
406 }; | 412 }; |
407 | 413 |
408 } // namespace net | 414 } // namespace net |
409 | 415 |
410 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 416 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
OLD | NEW |