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

Unified Diff: content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc

Issue 600163004: Add two UMA counters for IPv4 and IPv6 local candidates gathered in WebRTC PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the tracking of previous ice gathering state. Created 6 years, 3 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 | « content/renderer/media/rtc_peer_connection_handler.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc
diff --git a/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc
index 6d64c4c85a4582c8edfd7a3dc6a134ea27e8827e..d059fc96f44c3c9ee7bd22261eb0ebc51a9f1e88 100644
--- a/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc
@@ -404,6 +404,8 @@ class MockIceCandidate : public IceCandidateInterface {
: sdp_mid_(sdp_mid),
sdp_mline_index_(sdp_mline_index),
sdp_(sdp) {
+ // Assign an valid address to |candidate_| to pass assert in code.
+ candidate_.set_address(rtc::SocketAddress("127.0.0.1", 5000));
}
virtual ~MockIceCandidate() {}
virtual std::string sdp_mid() const OVERRIDE {
@@ -413,11 +415,7 @@ class MockIceCandidate : public IceCandidateInterface {
return sdp_mline_index_;
}
virtual const cricket::Candidate& candidate() const OVERRIDE {
- // This function should never be called. It will intentionally crash. The
- // base class forces us to return a reference.
- NOTREACHED();
- cricket::Candidate* candidate = NULL;
- return *candidate;
+ return candidate_;
}
virtual bool ToString(std::string* out) const OVERRIDE {
*out = sdp_;
@@ -428,6 +426,7 @@ class MockIceCandidate : public IceCandidateInterface {
std::string sdp_mid_;
int sdp_mline_index_;
std::string sdp_;
+ cricket::Candidate candidate_;
};
MockPeerConnectionDependencyFactory::MockPeerConnectionDependencyFactory()
« no previous file with comments | « content/renderer/media/rtc_peer_connection_handler.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698