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

Side by Side Diff: webrtc/api/peerconnectioninterface.h

Issue 2627093005: Move MetricsObserverInterface out of peerconnectioninterface.h (Closed)
Patch Set: Rebase Created 3 years, 11 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 | webrtc/api/umametrics.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 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // can be deleted. 115 // can be deleted.
116 virtual void OnComplete(const StatsReports& reports) {} 116 virtual void OnComplete(const StatsReports& reports) {}
117 virtual void OnCompleteReports(std::unique_ptr<StatsReports> reports) { 117 virtual void OnCompleteReports(std::unique_ptr<StatsReports> reports) {
118 OnComplete(*reports); 118 OnComplete(*reports);
119 } 119 }
120 120
121 protected: 121 protected:
122 virtual ~StatsObserver() {} 122 virtual ~StatsObserver() {}
123 }; 123 };
124 124
125 class MetricsObserverInterface : public rtc::RefCountInterface {
126 public:
127
128 // |type| is the type of the enum counter to be incremented. |counter|
129 // is the particular counter in that type. |counter_max| is the next sequence
130 // number after the highest counter.
131 virtual void IncrementEnumCounter(PeerConnectionEnumCounterType type,
132 int counter,
133 int counter_max) {}
134
135 // This is used to handle sparse counters like SSL cipher suites.
136 // TODO(guoweis): Remove the implementation once the dependency's interface
137 // definition is updated.
138 virtual void IncrementSparseEnumCounter(PeerConnectionEnumCounterType type,
139 int counter) {
140 IncrementEnumCounter(type, counter, 0 /* Ignored */);
141 }
142
143 virtual void AddHistogramSample(PeerConnectionMetricsName type,
144 int value) = 0;
145
146 protected:
147 virtual ~MetricsObserverInterface() {}
148 };
149
150 typedef MetricsObserverInterface UMAObserver;
151
152 // Enumeration to represent distinct classes of errors that an application 125 // Enumeration to represent distinct classes of errors that an application
153 // may wish to act upon differently. These roughly map to DOMExceptions or 126 // may wish to act upon differently. These roughly map to DOMExceptions or
154 // RTCError "errorDetailEnum" values in the web API, as described in the 127 // RTCError "errorDetailEnum" values in the web API, as described in the
155 // comments below. 128 // comments below.
156 enum class RTCErrorType { 129 enum class RTCErrorType {
157 // No error. 130 // No error.
158 NONE, 131 NONE,
159 // A supplied parameter is valid, but currently unsupported. 132 // A supplied parameter is valid, but currently unsupported.
160 // Maps to InvalidAccessError DOMException. 133 // Maps to InvalidAccessError DOMException.
161 UNSUPPORTED_PARAMETER, 134 UNSUPPORTED_PARAMETER,
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 cricket::WebRtcVideoEncoderFactory* encoder_factory, 888 cricket::WebRtcVideoEncoderFactory* encoder_factory,
916 cricket::WebRtcVideoDecoderFactory* decoder_factory) { 889 cricket::WebRtcVideoDecoderFactory* decoder_factory) {
917 return CreatePeerConnectionFactory( 890 return CreatePeerConnectionFactory(
918 worker_and_network_thread, worker_and_network_thread, signaling_thread, 891 worker_and_network_thread, worker_and_network_thread, signaling_thread,
919 default_adm, encoder_factory, decoder_factory); 892 default_adm, encoder_factory, decoder_factory);
920 } 893 }
921 894
922 } // namespace webrtc 895 } // namespace webrtc
923 896
924 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ 897 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/umametrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698