Move MetricsObserverInterface out of peerconnectioninterface.h

This change moves the definition of the UMA MetricsObserverInterface from api/peerconnectioninterface.h into api/umametrics.h. This allows us to remove the unwanted dependency on peerconnectioninterface.h from files in webrtc/p2p.

This is a simple refactoring with no functional changes.

BUG=None

Review-Url: https://codereview.webrtc.org/2627093005
Cr-Commit-Position: refs/heads/master@{#16020}
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index 5e1fd32..4e0739b 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -122,33 +122,6 @@
   virtual ~StatsObserver() {}
 };
 
-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;
-
 // Enumeration to represent distinct classes of errors that an application
 // may wish to act upon differently. These roughly map to DOMExceptions or
 // RTCError "errorDetailEnum" values in the web API, as described in the
diff --git a/webrtc/api/umametrics.h b/webrtc/api/umametrics.h
index 93c034f..3e92bac 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 @@
   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_