From a03cd3fdef6c823e89c76bb097abd8b83285e4da Mon Sep 17 00:00:00 2001 From: honghaiz Date: Mon, 13 Jul 2015 17:08:08 -0700 Subject: [PATCH] 1. Override and virtual has to be consistent. 2. provide an implementation for SetIceConnectionReceivingTimeout so that Chrome does not complain. BUG= Review URL: https://codereview.webrtc.org/1227843006 Cr-Commit-Position: refs/heads/master@{#9574} --- talk/app/webrtc/peerconnectioninterface.h | 2 +- webrtc/p2p/base/p2ptransportchannel.h | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/talk/app/webrtc/peerconnectioninterface.h b/talk/app/webrtc/peerconnectioninterface.h index 367bafe47c..ce32b50291 100644 --- a/talk/app/webrtc/peerconnectioninterface.h +++ b/talk/app/webrtc/peerconnectioninterface.h @@ -336,7 +336,7 @@ class PeerConnectionInterface : public rtc::RefCountInterface { virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer, SessionDescriptionInterface* desc) = 0; // Sets the ICE connection receiving timeout value in milliseconds. - virtual void SetIceConnectionReceivingTimeout(int timeout_ms) = 0; + virtual void SetIceConnectionReceivingTimeout(int timeout_ms) {} // Restarts or updates the ICE Agent process of gathering local candidates // and pinging remote candidates. virtual bool UpdateIce(const IceServers& configuration, diff --git a/webrtc/p2p/base/p2ptransportchannel.h b/webrtc/p2p/base/p2ptransportchannel.h index b8ad5e23bc..926de95a3b 100644 --- a/webrtc/p2p/base/p2ptransportchannel.h +++ b/webrtc/p2p/base/p2ptransportchannel.h @@ -73,6 +73,9 @@ class P2PTransportChannel : public TransportChannelImpl, virtual void Connect(); virtual void OnSignalingReady(); virtual void OnCandidate(const Candidate& candidate); + // Sets the receiving timeout in milliseconds. + // This also sets the check_receiving_delay proportionally. + virtual void SetReceivingTimeout(int receiving_timeout_ms); // From TransportChannel: virtual int SendPacket(const char *data, size_t len, @@ -85,10 +88,6 @@ class P2PTransportChannel : public TransportChannelImpl, const Connection* best_connection() const { return best_connection_; } void set_incoming_only(bool value) { incoming_only_ = value; } - // Sets the receiving timeout in milliseconds. - // This also sets the check_receiving_delay proportionally. - void SetReceivingTimeout(int receiving_timeout_ms) override; - // Note: This is only for testing purpose. // |ports_| should not be changed from outside. const std::vector& ports() { return ports_; }