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

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, 2 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
juberti 2015/09/24 21:37:32 We should use the IDs from https://tools.ietf.org/
guoweis_webrtc 2015/09/25 18:30:31 Done.
127 // the same as the order in histograms.xml.
128 enum SrtpCipherType {
129 SrtpCipher_Unknown,
130 SrtpCipher_AES_CM_128_HMAC_SHA1_32,
131 SrtpCipher_AES_CM_128_HMAC_SHA1_80,
132 SrtpCipher_Max,
juberti 2015/09/24 21:37:32 Why do we have these _Max values?
guoweis_webrtc 2015/09/25 18:30:32 Done.
133 };
134
135 SrtpCipherType GetSrtpCipherType(const std::string& cipher);
136
125 } // namespace webrtc 137 } // namespace webrtc
126 138
127 #endif // TALK_APP_WEBRTC_UMAMETRICS_H_ 139 #endif // TALK_APP_WEBRTC_UMAMETRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698