| 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 #include "net/http/http_server_properties.h" | 5 #include "net/http/http_server_properties.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "net/socket/ssl_client_socket.h" | 10 #include "net/socket/ssl_client_socket.h" |
| 11 #include "net/ssl/ssl_config.h" | 11 #include "net/ssl/ssl_config.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 const char kAlternateProtocolHeader[] = "Alternate-Protocol"; | |
| 16 const char kAlternativeServiceHeader[] = "Alt-Svc"; | 15 const char kAlternativeServiceHeader[] = "Alt-Svc"; |
| 17 | 16 |
| 18 namespace { | 17 namespace { |
| 19 | 18 |
| 20 // The order of these strings much match the order of the enum definition | 19 // The order of these strings much match the order of the enum definition |
| 21 // for AlternateProtocol. | 20 // for AlternateProtocol. |
| 22 const char* const kAlternateProtocolStrings[] = { | 21 const char* const kAlternateProtocolStrings[] = { |
| 23 "npn-spdy/3.1", | 22 "npn-spdy/3.1", |
| 24 "npn-h2", | 23 "npn-h2", |
| 25 "quic"}; | 24 "quic"}; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 104 |
| 106 // static | 105 // static |
| 107 void HttpServerProperties::ForceHTTP11(SSLConfig* ssl_config) { | 106 void HttpServerProperties::ForceHTTP11(SSLConfig* ssl_config) { |
| 108 ssl_config->alpn_protos.clear(); | 107 ssl_config->alpn_protos.clear(); |
| 109 ssl_config->alpn_protos.push_back(kProtoHTTP11); | 108 ssl_config->alpn_protos.push_back(kProtoHTTP11); |
| 110 ssl_config->npn_protos.clear(); | 109 ssl_config->npn_protos.clear(); |
| 111 ssl_config->npn_protos.push_back(kProtoHTTP11); | 110 ssl_config->npn_protos.push_back(kProtoHTTP11); |
| 112 } | 111 } |
| 113 | 112 |
| 114 } // namespace net | 113 } // namespace net |
| OLD | NEW |