From 75c8fb4b2c138b99f6bb7ffa6e2f415594116eed Mon Sep 17 00:00:00 2001 From: hbos Date: Wed, 12 Oct 2016 14:48:15 -0700 Subject: [PATCH] DataChannelInterface default impl of [messages/bytes]_[sent/received]. The default implementations are provided as to not break Chromium mocks, as soon as we have done a successful roll they should be updated and the default implementations removed. TBR=hta@webrtc.org, deadbeef@webrtc.org NOTRY=True BUG=chromium:654927 Review-Url: https://codereview.webrtc.org/2414613003 Cr-Commit-Position: refs/heads/master@{#14617} --- webrtc/api/datachannelinterface.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/webrtc/api/datachannelinterface.h b/webrtc/api/datachannelinterface.h index 8b788c0468..ddeb1e5636 100644 --- a/webrtc/api/datachannelinterface.h +++ b/webrtc/api/datachannelinterface.h @@ -125,10 +125,13 @@ class DataChannelInterface : public rtc::RefCountInterface { virtual int id() const = 0; virtual DataState state() const = 0; - virtual uint32_t messages_sent() const = 0; - virtual uint64_t bytes_sent() const = 0; - virtual uint32_t messages_received() const = 0; - virtual uint64_t bytes_received() const = 0; + // TODO(hbos): Default implementations of [messages/bytes]_[sent/received] as + // to not break Chromium. Fix Chromium's implementation as soon as this rolls. + // crbug.com/654927 + virtual uint32_t messages_sent() const { return 0; } + virtual uint64_t bytes_sent() const { return 0; } + virtual uint32_t messages_received() const { return 0; } + virtual uint64_t bytes_received() const { return 0; } // The buffered_amount returns the number of bytes of application data // (UTF-8 text and binary data) that have been queued using SendBuffer but // have not yet been transmitted to the network.