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

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

Issue 707953002: Update ALPN/NPN token from "h2-14" to "h2-15". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another occurrence. Created 6 years, 1 month 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_response_info.cc ('k') | net/socket/next_proto.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 10
11 namespace net { 11 namespace net {
12 12
13 const char kAlternateProtocolHeader[] = "Alternate-Protocol"; 13 const char kAlternateProtocolHeader[] = "Alternate-Protocol";
14 14
15 namespace { 15 namespace {
16 16
17 // The order of these strings much match the order of the enum definition 17 // The order of these strings much match the order of the enum definition
18 // for AlternateProtocol. 18 // for AlternateProtocol.
19 const char* const kAlternateProtocolStrings[] = { 19 const char* const kAlternateProtocolStrings[] = {
20 "npn-spdy/2", 20 "npn-spdy/2",
21 "npn-spdy/3", 21 "npn-spdy/3",
22 "npn-spdy/3.1", 22 "npn-spdy/3.1",
23 "npn-h2-14", // HTTP/2 draft 14. Called SPDY4 internally. 23 "npn-h2-15", // HTTP/2 draft-15. Called SPDY4 internally.
24 "quic" 24 "quic"
25 }; 25 };
26 26
27 COMPILE_ASSERT( 27 COMPILE_ASSERT(
28 arraysize(kAlternateProtocolStrings) == NUM_VALID_ALTERNATE_PROTOCOLS, 28 arraysize(kAlternateProtocolStrings) == NUM_VALID_ALTERNATE_PROTOCOLS,
29 kAlternateProtocolStringsSize_kNumValidAlternateProtocols_not_equal); 29 kAlternateProtocolStringsSize_kNumValidAlternateProtocols_not_equal);
30 30
31 } // namespace 31 } // namespace
32 32
33 void HistogramAlternateProtocolUsage(AlternateProtocolUsage usage) { 33 void HistogramAlternateProtocolUsage(AlternateProtocolUsage usage) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 std::string AlternateProtocolInfo::ToString() const { 98 std::string AlternateProtocolInfo::ToString() const {
99 return base::StringPrintf("%d:%s p=%f%s", port, 99 return base::StringPrintf("%d:%s p=%f%s", port,
100 AlternateProtocolToString(protocol), 100 AlternateProtocolToString(protocol),
101 probability, 101 probability,
102 is_broken ? " (broken)" : ""); 102 is_broken ? " (broken)" : "");
103 } 103 }
104 104
105 } // namespace net 105 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_response_info.cc ('k') | net/socket/next_proto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698