Add network_type to local RTCIceCandidateStats

Details:
  * Add RTCNetworkType enum
  * Add network_type to local ice candidate stats

Bug: webrtc:8435
Change-Id: Idb872849c09ad49c8f759d02afdc825e397afa07
Reviewed-on: https://webrtc-review.googlesource.com/14680
Commit-Queue: Gary Liu <qinghualiu@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20822}
diff --git a/api/stats/rtcstats_objects.h b/api/stats/rtcstats_objects.h
index 97a7d3c..b0cf3d0 100644
--- a/api/stats/rtcstats_objects.h
+++ b/api/stats/rtcstats_objects.h
@@ -60,6 +60,17 @@
   static const char* const kVideo;
 };
 
+// https://w3c.github.io/webrtc-stats/#dom-rtcnetworktype
+struct RTCNetworkType {
+  static const char* const kBluetooth;
+  static const char* const kCellular;
+  static const char* const kEthernet;
+  static const char* const kWifi;
+  static const char* const kWimax;
+  static const char* const kVpn;
+  static const char* const kUnknown;
+};
+
 // https://w3c.github.io/webrtc-stats/#certificatestats-dict*
 class RTCCertificateStats final : public RTCStats {
  public:
@@ -181,6 +192,7 @@
 
   RTCStatsMember<std::string> transport_id;
   RTCStatsMember<bool> is_remote;
+  RTCStatsMember<std::string> network_type;
   RTCStatsMember<std::string> ip;
   RTCStatsMember<int32_t> port;
   RTCStatsMember<std::string> protocol;