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

Unified Diff: webrtc/api/umametrics.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/peerconnectioninterface.h ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/umametrics.h
diff --git a/webrtc/api/umametrics.h b/webrtc/api/umametrics.h
index 93c034f7c253d47e19c75e458048b0bf8e15f910..3e92bace12225b354aa9bd8fed464bf2746aa2a9 100644
--- a/webrtc/api/umametrics.h
+++ b/webrtc/api/umametrics.h
@@ -13,6 +13,8 @@
#ifndef WEBRTC_API_UMAMETRICS_H_
#define WEBRTC_API_UMAMETRICS_H_
+#include "webrtc/base/refcount.h"
+
namespace webrtc {
// Used to specify which enum counter type we're incrementing in
@@ -109,6 +111,33 @@ enum IceCandidatePairType {
kIceCandidatePairMax
};
+class MetricsObserverInterface : public rtc::RefCountInterface {
+ public:
+
+ // |type| is the type of the enum counter to be incremented. |counter|
+ // is the particular counter in that type. |counter_max| is the next sequence
+ // number after the highest counter.
+ virtual void IncrementEnumCounter(PeerConnectionEnumCounterType type,
+ int counter,
+ int counter_max) {}
+
+ // This is used to handle sparse counters like SSL cipher suites.
+ // TODO(guoweis): Remove the implementation once the dependency's interface
+ // definition is updated.
+ virtual void IncrementSparseEnumCounter(PeerConnectionEnumCounterType type,
+ int counter) {
+ IncrementEnumCounter(type, counter, 0 /* Ignored */);
+ }
+
+ virtual void AddHistogramSample(PeerConnectionMetricsName type,
+ int value) = 0;
+
+ protected:
+ virtual ~MetricsObserverInterface() {}
+};
+
+typedef MetricsObserverInterface UMAObserver;
+
} // namespace webrtc
#endif // WEBRTC_API_UMAMETRICS_H_
« no previous file with comments | « webrtc/api/peerconnectioninterface.h ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698