| 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.h" |    8 #include "base/metrics/histogram.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" | 
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   94     case kProtoUnknown: |   94     case kProtoUnknown: | 
|   95     case kProtoHTTP11: |   95     case kProtoHTTP11: | 
|   96       break; |   96       break; | 
|   97   } |   97   } | 
|   98  |   98  | 
|   99   NOTREACHED() << "Invalid NextProto: " << next_proto; |   99   NOTREACHED() << "Invalid NextProto: " << next_proto; | 
|  100   return UNINITIALIZED_ALTERNATE_PROTOCOL; |  100   return UNINITIALIZED_ALTERNATE_PROTOCOL; | 
|  101 } |  101 } | 
|  102  |  102  | 
|  103 std::string AlternateProtocolInfo::ToString() const { |  103 std::string AlternateProtocolInfo::ToString() const { | 
|  104   return base::StringPrintf("%d:%s p=%f", port, |  104   return base::StringPrintf("%d:%s p=%f%s", port, | 
|  105                             AlternateProtocolToString(protocol), probability); |  105                             AlternateProtocolToString(protocol), | 
 |  106                             probability, | 
 |  107                             is_broken ? " (broken)" : ""); | 
|  106 } |  108 } | 
|  107  |  109  | 
|  108 // static |  110 // static | 
|  109 void HttpServerProperties::ForceHTTP11(SSLConfig* ssl_config) { |  111 void HttpServerProperties::ForceHTTP11(SSLConfig* ssl_config) { | 
|  110   ssl_config->next_protos.clear(); |  112   ssl_config->next_protos.clear(); | 
|  111   ssl_config->next_protos.push_back(kProtoHTTP11); |  113   ssl_config->next_protos.push_back(kProtoHTTP11); | 
|  112 } |  114 } | 
|  113  |  115  | 
|  114 }  // namespace net |  116 }  // namespace net | 
| OLD | NEW |