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

Side by Side Diff: talk/app/webrtc/umametrics.h

Issue 1337673002: Change WebRTC SslCipher to be exposed as number only. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 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
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 24 matching lines...) Expand all
35 // Used to specify which enum counter type we're incrementing in 35 // Used to specify which enum counter type we're incrementing in
36 // MetricsObserverInterface::IncrementEnumCounter. 36 // MetricsObserverInterface::IncrementEnumCounter.
37 enum PeerConnectionEnumCounterType { 37 enum PeerConnectionEnumCounterType {
38 kEnumCounterAddressFamily, 38 kEnumCounterAddressFamily,
39 // For the next 2 counters, we track them separately based on the "first hop" 39 // For the next 2 counters, we track them separately based on the "first hop"
40 // protocol used by the local candidate. "First hop" means the local candidate 40 // protocol used by the local candidate. "First hop" means the local candidate
41 // type in the case of non-TURN candidates, and the protocol used to connect 41 // type in the case of non-TURN candidates, and the protocol used to connect
42 // to the TURN server in the case of TURN candidates. 42 // to the TURN server in the case of TURN candidates.
43 kEnumCounterIceCandidatePairTypeUdp, 43 kEnumCounterIceCandidatePairTypeUdp,
44 kEnumCounterIceCandidatePairTypeTcp, 44 kEnumCounterIceCandidatePairTypeTcp,
45
46 kEnumCounterAudioSrtpCipher,
47 kEnumCounterAudioSslCipher,
48 kEnumCounterVideoSrtpCipher,
49 kEnumCounterVideoSslCipher,
50 kEnumCounterDataSrtpCipher,
51 kEnumCounterDataSslCipher,
45 kPeerConnectionEnumCounterMax 52 kPeerConnectionEnumCounterMax
46 }; 53 };
47 54
48 // Currently this contains information related to WebRTC network/transport 55 // Currently this contains information related to WebRTC network/transport
49 // information. 56 // information.
50 57
51 // The difference between PeerConnectionEnumCounter and 58 // The difference between PeerConnectionEnumCounter and
52 // PeerConnectionMetricsName is that the "EnumCounter" is only counting the 59 // PeerConnectionMetricsName is that the "EnumCounter" is only counting the
53 // occurrences of events, while "Name" has a value associated with it which is 60 // occurrences of events, while "Name" has a value associated with it which is
54 // used to form a histogram. 61 // used to form a histogram.
(...skipping 16 matching lines...) Expand all
71 // TODO(guoweis): Keep previous name here until all references are renamed. 78 // TODO(guoweis): Keep previous name here until all references are renamed.
72 typedef PeerConnectionAddressFamilyCounter PeerConnectionUMAMetricsCounter; 79 typedef PeerConnectionAddressFamilyCounter PeerConnectionUMAMetricsCounter;
73 80
74 // This enum defines types for UMA samples, which will have a range. 81 // This enum defines types for UMA samples, which will have a range.
75 enum PeerConnectionMetricsName { 82 enum PeerConnectionMetricsName {
76 kNetworkInterfaces_IPv4, // Number of IPv4 interfaces. 83 kNetworkInterfaces_IPv4, // Number of IPv4 interfaces.
77 kNetworkInterfaces_IPv6, // Number of IPv6 interfaces. 84 kNetworkInterfaces_IPv6, // Number of IPv6 interfaces.
78 kTimeToConnect, // In milliseconds. 85 kTimeToConnect, // In milliseconds.
79 kLocalCandidates_IPv4, // Number of IPv4 local candidates. 86 kLocalCandidates_IPv4, // Number of IPv4 local candidates.
80 kLocalCandidates_IPv6, // Number of IPv6 local candidates. 87 kLocalCandidates_IPv6, // Number of IPv6 local candidates.
81 kAudioSrtpCipher, // Name of SRTP cipher used in audio channel.
82 kAudioSslCipher, // Name of SSL cipher used in audio channel.
83 kVideoSrtpCipher, // Name of SRTP cipher used in video channel.
84 kVideoSslCipher, // Name of SSL cipher used in video channel.
85 kDataSrtpCipher, // Name of SRTP cipher used in data channel.
86 kDataSslCipher, // Name of SSL cipher used in data channel.
87 kPeerConnectionMetricsName_Max 88 kPeerConnectionMetricsName_Max
88 }; 89 };
89 90
90 // TODO(guoweis): Keep previous name here until all references are renamed. 91 // TODO(guoweis): Keep previous name here until all references are renamed.
91 typedef PeerConnectionMetricsName PeerConnectionUMAMetricsName; 92 typedef PeerConnectionMetricsName PeerConnectionUMAMetricsName;
92 93
93 // The IceCandidatePairType has the format of 94 // The IceCandidatePairType has the format of
94 // <local_candidate_type>_<remote_candidate_type>. It is recorded based on the 95 // <local_candidate_type>_<remote_candidate_type>. It is recorded based on the
95 // type of candidate pair used when the PeerConnection first goes to a completed 96 // type of candidate pair used when the PeerConnection first goes to a completed
96 // state. When BUNDLE is enabled, only the first transport gets recorded. 97 // state. When BUNDLE is enabled, only the first transport gets recorded.
(...skipping 18 matching lines...) Expand all
115 116
116 // The following 4 types tell whether local and remote hosts have private or 117 // The following 4 types tell whether local and remote hosts have private or
117 // public IP addresses. 118 // public IP addresses.
118 kIceCandidatePairHostPrivateHostPrivate, 119 kIceCandidatePairHostPrivateHostPrivate,
119 kIceCandidatePairHostPrivateHostPublic, 120 kIceCandidatePairHostPrivateHostPublic,
120 kIceCandidatePairHostPublicHostPrivate, 121 kIceCandidatePairHostPublicHostPrivate,
121 kIceCandidatePairHostPublicHostPublic, 122 kIceCandidatePairHostPublicHostPublic,
122 kIceCandidatePairMax 123 kIceCandidatePairMax
123 }; 124 };
124 125
126 // The same list as SrtpCipherMap from opensslstsreamadapter.cc. Must be kept
127 // the same as the order in histograms.xml.
128 enum SrtpCipherType {
129 SrtpCipherType_Unknown,
130 SrtpCipherType_AES_CM_128_HMAC_SHA1_32,
131 SrtpCipherType_AES_CM_128_HMAC_SHA1_80,
132 SrtpCipherType_Max,
133 };
134
135 SrtpCipherType GetSrtpCipherType(const std::string& cipher);
136
137 // The same list as kSslCipherMap from opensslstsreamadapter.cc. Must be
138 // kept the same as the order in histograms.xml.
139 enum SslCipherType {
140 SslCipherType_Unknown,
141
142 // TLS v1.0 ciphersuites from RFC2246.
143 SslCipherType_TLS_RSA_RC4_128_SHA,
144 SslCipherType_TLS_RSA_WITH_3DES_EDE_CBC_SHA,
145
146 // AES ciphersuites from RFC3268.
147 SslCipherType_TLS_RSA_WITH_AES_128_CBC_SHA,
148 SslCipherType_TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
149 SslCipherType_TLS_RSA_WITH_AES_256_CBC_SHA,
150 SslCipherType_TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
151
152 // ECC ciphersuites from RFC4492.
153 SslCipherType_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
154 SslCipherType_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
155 SslCipherType_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
156 SslCipherType_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
157
158 SslCipherType_TLS_ECDHE_RSA_WITH_RC4_128_SHA,
159 SslCipherType_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
160 SslCipherType_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
161 SslCipherType_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
162
163 // TLS v1.2 ciphersuites.
164 SslCipherType_TLS_RSA_WITH_AES_128_CBC_SHA256,
165 SslCipherType_TLS_RSA_WITH_AES_256_CBC_SHA256,
166 SslCipherType_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
167 SslCipherType_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
168
169 // TLS v1.2 GCM ciphersuites from RFC5288.
170 SslCipherType_TLS_RSA_WITH_AES_128_GCM_SHA256,
171 SslCipherType_TLS_RSA_WITH_AES_256_GCM_SHA384,
172 SslCipherType_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
173 SslCipherType_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
174 SslCipherType_TLS_DH_RSA_WITH_AES_128_GCM_SHA256,
175 SslCipherType_TLS_DH_RSA_WITH_AES_256_GCM_SHA384,
176
177 // ECDH HMAC based ciphersuites from RFC5289.
178 SslCipherType_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
179 SslCipherType_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
180 SslCipherType_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
181 SslCipherType_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
182
183 // ECDH GCM based ciphersuites from RFC5289.
184 SslCipherType_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
185 SslCipherType_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
186 SslCipherType_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
187 SslCipherType_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
188
189 SslCipherType_Max,
190 };
191
192 SslCipherType GetSslCipherType(const std::string& cipher);
193
125 } // namespace webrtc 194 } // namespace webrtc
126 195
127 #endif // TALK_APP_WEBRTC_UMAMETRICS_H_ 196 #endif // TALK_APP_WEBRTC_UMAMETRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698