Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: net/http/http_server_properties.cc

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "net/ssl/ssl_config.h"
10 12
11 namespace net { 13 namespace net {
12 14
13 const char kAlternateProtocolHeader[] = "Alternate-Protocol"; 15 const char kAlternateProtocolHeader[] = "Alternate-Protocol";
14 16
15 namespace { 17 namespace {
16 18
17 // 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
18 // for AlternateProtocol. 20 // for AlternateProtocol.
19 const char* const kAlternateProtocolStrings[] = { 21 const char* const kAlternateProtocolStrings[] = {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 return UNINITIALIZED_ALTERNATE_PROTOCOL; 101 return UNINITIALIZED_ALTERNATE_PROTOCOL;
100 } 102 }
101 103
102 std::string AlternateProtocolInfo::ToString() const { 104 std::string AlternateProtocolInfo::ToString() const {
103 return base::StringPrintf("%d:%s p=%f%s", port, 105 return base::StringPrintf("%d:%s p=%f%s", port,
104 AlternateProtocolToString(protocol), 106 AlternateProtocolToString(protocol),
105 probability, 107 probability,
106 is_broken ? " (broken)" : ""); 108 is_broken ? " (broken)" : "");
107 } 109 }
108 110
111 // static
112 void HttpServerProperties::ForceHTTP11(SSLConfig* ssl_config) {
113 ssl_config->next_protos.clear();
114 ssl_config->next_protos.push_back(kProtoHTTP11);
115 }
116
109 } // namespace net 117 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698