Chromium Code Reviews| 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 const NextProto& protocol() const { return alternative_service_.protocol; } | |
|
Bence
2017/06/28 19:08:58
NextProto is an enum, might be better to return by
Zhongyi Shi
2017/07/05 23:08:59
Done.
| |
| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 402 // Returns whether HttpServerProperties is initialized. | 408 // Returns whether HttpServerProperties is initialized. |
| 403 virtual bool IsInitialized() const = 0; | 409 virtual bool IsInitialized() const = 0; |
| 404 | 410 |
| 405 private: | 411 private: |
| 406 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 412 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
| 407 }; | 413 }; |
| 408 | 414 |
| 409 } // namespace net | 415 } // namespace net |
| 410 | 416 |
| 411 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 417 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| OLD | NEW |