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

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

Issue 997953003: Add IsAlternativeServiceBroken(), remove is_broken. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ignore_result. Created 5 years, 9 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" 10 #include "net/socket/ssl_client_socket.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
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%s", port, 104 return base::StringPrintf("%d:%s p=%f", port,
105 AlternateProtocolToString(protocol), 105 AlternateProtocolToString(protocol), probability);
106 probability,
107 is_broken ? " (broken)" : "");
108 } 106 }
109 107
110 // static 108 // static
111 void HttpServerProperties::ForceHTTP11(SSLConfig* ssl_config) { 109 void HttpServerProperties::ForceHTTP11(SSLConfig* ssl_config) {
112 ssl_config->next_protos.clear(); 110 ssl_config->next_protos.clear();
113 ssl_config->next_protos.push_back(kProtoHTTP11); 111 ssl_config->next_protos.push_back(kProtoHTTP11);
114 } 112 }
115 113
116 } // namespace net 114 } // 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