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

Side by Side Diff: talk/app/webrtc/peerconnectioninterface.h

Issue 1277263002: Add instrumentation to track the IceEndpointType. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 4 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
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 class StatsObserver : public rtc::RefCountInterface { 119 class StatsObserver : public rtc::RefCountInterface {
120 public: 120 public:
121 virtual void OnComplete(const StatsReports& reports) = 0; 121 virtual void OnComplete(const StatsReports& reports) = 0;
122 122
123 protected: 123 protected:
124 virtual ~StatsObserver() {} 124 virtual ~StatsObserver() {}
125 }; 125 };
126 126
127 class MetricsObserverInterface : public rtc::RefCountInterface { 127 class MetricsObserverInterface : public rtc::RefCountInterface {
128 public: 128 public:
129 virtual void IncrementCounter(PeerConnectionMetricsCounter type) = 0; 129 // TODO(guoweis): Remove this function once IncrementEnumCounter gets into
130 // chromium. IncrementCounter only deals with one type of enumeration counter,
131 // i.e. PeerConnectionAddressFamilyCounter. Instead of creating a function for
132 // each enum type, IncrementEnumCounter is generalized with the enum type
133 // parameter.
134 virtual void IncrementCounter(PeerConnectionAddressFamilyCounter type) {}
135
136 // |type| is the type of the enum counter to be incremented. |counter|
137 // is the particular counter in that type. |counter_max| is the next sequence
138 // number after the highest counter.
139 virtual void IncrementEnumCounter(PeerConnectionEnumCounterType type,
140 int counter,
141 int counter_max) {}
142
130 virtual void AddHistogramSample(PeerConnectionMetricsName type, 143 virtual void AddHistogramSample(PeerConnectionMetricsName type,
131 int value) = 0; 144 int value) = 0;
132 // TODO(jbauch): Make method abstract when it is implemented by Chromium. 145 // TODO(jbauch): Make method abstract when it is implemented by Chromium.
133 virtual void AddHistogramSample(PeerConnectionMetricsName type, 146 virtual void AddHistogramSample(PeerConnectionMetricsName type,
134 const std::string& value) {} 147 const std::string& value) {}
135 148
136 protected: 149 protected:
137 virtual ~MetricsObserverInterface() {} 150 virtual ~MetricsObserverInterface() {}
138 }; 151 };
139 152
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 }; 184 };
172 185
173 enum IceConnectionState { 186 enum IceConnectionState {
174 kIceConnectionNew, 187 kIceConnectionNew,
175 kIceConnectionChecking, 188 kIceConnectionChecking,
176 kIceConnectionConnected, 189 kIceConnectionConnected,
177 kIceConnectionCompleted, 190 kIceConnectionCompleted,
178 kIceConnectionFailed, 191 kIceConnectionFailed,
179 kIceConnectionDisconnected, 192 kIceConnectionDisconnected,
180 kIceConnectionClosed, 193 kIceConnectionClosed,
194 kIceConnectionMax,
181 }; 195 };
182 196
183 struct IceServer { 197 struct IceServer {
184 // TODO(jbauch): Remove uri when all code using it has switched to urls. 198 // TODO(jbauch): Remove uri when all code using it has switched to urls.
185 std::string uri; 199 std::string uri;
186 std::vector<std::string> urls; 200 std::vector<std::string> urls;
187 std::string username; 201 std::string username;
188 std::string password; 202 std::string password;
189 }; 203 };
190 typedef std::vector<IceServer> IceServers; 204 typedef std::vector<IceServer> IceServers;
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 CreatePeerConnectionFactory( 594 CreatePeerConnectionFactory(
581 rtc::Thread* worker_thread, 595 rtc::Thread* worker_thread,
582 rtc::Thread* signaling_thread, 596 rtc::Thread* signaling_thread,
583 AudioDeviceModule* default_adm, 597 AudioDeviceModule* default_adm,
584 cricket::WebRtcVideoEncoderFactory* encoder_factory, 598 cricket::WebRtcVideoEncoderFactory* encoder_factory,
585 cricket::WebRtcVideoDecoderFactory* decoder_factory); 599 cricket::WebRtcVideoDecoderFactory* decoder_factory);
586 600
587 } // namespace webrtc 601 } // namespace webrtc
588 602
589 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 603 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698