OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // public IP addresses. | 106 // public IP addresses. |
107 kIceCandidatePairHostPrivateHostPrivate, | 107 kIceCandidatePairHostPrivateHostPrivate, |
108 kIceCandidatePairHostPrivateHostPublic, | 108 kIceCandidatePairHostPrivateHostPublic, |
109 kIceCandidatePairHostPublicHostPrivate, | 109 kIceCandidatePairHostPublicHostPrivate, |
110 kIceCandidatePairHostPublicHostPublic, | 110 kIceCandidatePairHostPublicHostPublic, |
111 kIceCandidatePairMax | 111 kIceCandidatePairMax |
112 }; | 112 }; |
113 | 113 |
114 class MetricsObserverInterface : public rtc::RefCountInterface { | 114 class MetricsObserverInterface : public rtc::RefCountInterface { |
115 public: | 115 public: |
116 | |
117 // |type| is the type of the enum counter to be incremented. |counter| | 116 // |type| is the type of the enum counter to be incremented. |counter| |
118 // is the particular counter in that type. |counter_max| is the next sequence | 117 // is the particular counter in that type. |counter_max| is the next sequence |
119 // number after the highest counter. | 118 // number after the highest counter. |
120 virtual void IncrementEnumCounter(PeerConnectionEnumCounterType type, | 119 virtual void IncrementEnumCounter(PeerConnectionEnumCounterType type, |
121 int counter, | 120 int counter, |
122 int counter_max) {} | 121 int counter_max) {} |
123 | 122 |
124 // This is used to handle sparse counters like SSL cipher suites. | 123 // This is used to handle sparse counters like SSL cipher suites. |
125 // TODO(guoweis): Remove the implementation once the dependency's interface | 124 // TODO(guoweis): Remove the implementation once the dependency's interface |
126 // definition is updated. | 125 // definition is updated. |
127 virtual void IncrementSparseEnumCounter(PeerConnectionEnumCounterType type, | 126 virtual void IncrementSparseEnumCounter(PeerConnectionEnumCounterType type, |
128 int counter) { | 127 int counter) { |
129 IncrementEnumCounter(type, counter, 0 /* Ignored */); | 128 IncrementEnumCounter(type, counter, 0 /* Ignored */); |
130 } | 129 } |
131 | 130 |
132 virtual void AddHistogramSample(PeerConnectionMetricsName type, | 131 virtual void AddHistogramSample(PeerConnectionMetricsName type, |
133 int value) = 0; | 132 int value) = 0; |
134 | 133 |
135 protected: | 134 protected: |
136 virtual ~MetricsObserverInterface() {} | 135 virtual ~MetricsObserverInterface() {} |
137 }; | 136 }; |
138 | 137 |
139 typedef MetricsObserverInterface UMAObserver; | 138 typedef MetricsObserverInterface UMAObserver; |
140 | 139 |
141 } // namespace webrtc | 140 } // namespace webrtc |
142 | 141 |
143 #endif // WEBRTC_API_UMAMETRICS_H_ | 142 #endif // WEBRTC_API_UMAMETRICS_H_ |
OLD | NEW |