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

Side by Side Diff: net/socket/next_proto.h

Issue 560573002: Introduce new SPDY Version UMA histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Introduce new histogram with permanent values. Created 6 years, 3 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 | « no previous file | net/socket/next_proto.cc » ('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 #ifndef NET_SOCKET_NEXT_PROTO_H_ 5 #ifndef NET_SOCKET_NEXT_PROTO_H_
6 #define NET_SOCKET_NEXT_PROTO_H_ 6 #define NET_SOCKET_NEXT_PROTO_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
(...skipping 14 matching lines...) Expand all
25 kProtoSPDY3, 25 kProtoSPDY3,
26 kProtoSPDY31, 26 kProtoSPDY31,
27 kProtoSPDY4, // SPDY4 is HTTP/2. 27 kProtoSPDY4, // SPDY4 is HTTP/2.
28 kProtoSPDYMaximumVersion = kProtoSPDY4, 28 kProtoSPDYMaximumVersion = kProtoSPDY4,
29 29
30 kProtoQUIC1SPDY3, 30 kProtoQUIC1SPDY3,
31 31
32 kProtoMaximumVersion = kProtoQUIC1SPDY3, 32 kProtoMaximumVersion = kProtoQUIC1SPDY3,
33 }; 33 };
34 34
35 // NextProto is contiguous, therefore values can change when protocols are
36 // removed. This function returns invariant values, so that UMA histograms can
37 // be combined for different releases.
38 unsigned int SpdyProtoPermanentValue(NextProto protocol);
39
40 // One larger than the maximum value SpdyProtoPermanentValue can return.
41 const unsigned int spdyProtoPermanentValueBoundary = 5;
Alexei Svitkine (slow) 2014/09/11 18:29:58 I suggest just making an enum for the PermanentVal
Bence 2014/09/12 12:37:07 You're right, we need a proper enum here. This is
Alexei Svitkine (slow) 2014/09/12 14:38:08 That SGTM.
Bence 2014/09/12 20:16:56 Done.
42
35 // List of protocols to use for NPN, used for configuring HttpNetworkSessions. 43 // List of protocols to use for NPN, used for configuring HttpNetworkSessions.
36 typedef std::vector<NextProto> NextProtoVector; 44 typedef std::vector<NextProto> NextProtoVector;
37 45
38 // Convenience functions to create NextProtoVector. 46 // Convenience functions to create NextProtoVector.
39 47
40 NET_EXPORT NextProtoVector NextProtosHttpOnly(); 48 NET_EXPORT NextProtoVector NextProtosHttpOnly();
41 49
42 // Default values, which are subject to change over time. Currently just 50 // Default values, which are subject to change over time. Currently just
43 // SPDY 3 and 3.1. 51 // SPDY 3 and 3.1.
44 NET_EXPORT NextProtoVector NextProtosDefaults(); 52 NET_EXPORT NextProtoVector NextProtosDefaults();
45 53
46 NET_EXPORT NextProtoVector NextProtosWithSpdyAndQuic(bool spdy_enabled, 54 NET_EXPORT NextProtoVector NextProtosWithSpdyAndQuic(bool spdy_enabled,
47 bool quic_enabled); 55 bool quic_enabled);
48 56
49 // All of these also enable QUIC. 57 // All of these also enable QUIC.
50 NET_EXPORT NextProtoVector NextProtosSpdy3(); 58 NET_EXPORT NextProtoVector NextProtosSpdy3();
51 NET_EXPORT NextProtoVector NextProtosSpdy31(); 59 NET_EXPORT NextProtoVector NextProtosSpdy31();
52 NET_EXPORT NextProtoVector NextProtosSpdy31WithSpdy2(); 60 NET_EXPORT NextProtoVector NextProtosSpdy31WithSpdy2();
53 NET_EXPORT NextProtoVector NextProtosSpdy4Http2(); 61 NET_EXPORT NextProtoVector NextProtosSpdy4Http2();
54 62
55 } // namespace net 63 } // namespace net
56 64
57 #endif // NET_SOCKET_NEXT_PROTO_H_ 65 #endif // NET_SOCKET_NEXT_PROTO_H_
OLDNEW
« no previous file with comments | « no previous file | net/socket/next_proto.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698