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

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

Issue 995013004: Add IsAlternativeServiceBroken(), remove is_broken. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More nits. 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
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 case kProtoUnknown: 98 case kProtoUnknown:
99 case kProtoHTTP11: 99 case kProtoHTTP11:
100 break; 100 break;
101 } 101 }
102 102
103 NOTREACHED() << "Invalid NextProto: " << next_proto; 103 NOTREACHED() << "Invalid NextProto: " << next_proto;
104 return UNINITIALIZED_ALTERNATE_PROTOCOL; 104 return UNINITIALIZED_ALTERNATE_PROTOCOL;
105 } 105 }
106 106
107 std::string AlternateProtocolInfo::ToString() const { 107 std::string AlternateProtocolInfo::ToString() const {
108 return base::StringPrintf("%d:%s p=%f%s", port, 108 return base::StringPrintf("%d:%s p=%f", port,
109 AlternateProtocolToString(protocol), 109 AlternateProtocolToString(protocol), probability);
110 probability,
111 is_broken ? " (broken)" : "");
112 } 110 }
113 111
114 // static 112 // static
115 void HttpServerProperties::ForceHTTP11(SSLConfig* ssl_config) { 113 void HttpServerProperties::ForceHTTP11(SSLConfig* ssl_config) {
116 ssl_config->next_protos.clear(); 114 ssl_config->next_protos.clear();
117 ssl_config->next_protos.push_back(kProtoHTTP11); 115 ssl_config->next_protos.push_back(kProtoHTTP11);
118 } 116 }
119 117
120 } // namespace net 118 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698