diff options
author | mallinath@chromium.org <mallinath@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 23:11:57 +0000 |
---|---|---|
committer | mallinath@chromium.org <mallinath@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 23:11:57 +0000 |
commit | 7791cf4320968b5d1fde781626dbbf0cf96b8ab5 (patch) | |
tree | 1302a7a907fdec9122c1690b0988966da390a0f3 /jingle/glue | |
parent | 6ef08fe1cbf13b0fa2498d7354a95a58ee317338 (diff) | |
download | chromium_src-7791cf4320968b5d1fde781626dbbf0cf96b8ab5.zip chromium_src-7791cf4320968b5d1fde781626dbbf0cf96b8ab5.tar.gz chromium_src-7791cf4320968b5d1fde781626dbbf0cf96b8ab5.tar.bz2 |
Update webrtc to r4819.
R=ronghuawu@chromium.org, sergeyu@chromium.org
Review URL: https://codereview.chromium.org/24364005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle/glue')
-rw-r--r-- | jingle/glue/channel_socket_adapter.cc | 6 | ||||
-rw-r--r-- | jingle/glue/channel_socket_adapter_unittest.cc | 11 | ||||
-rw-r--r-- | jingle/glue/fake_socket_factory.cc | 8 | ||||
-rw-r--r-- | jingle/glue/fake_socket_factory.h | 6 |
4 files changed, 21 insertions, 10 deletions
diff --git a/jingle/glue/channel_socket_adapter.cc b/jingle/glue/channel_socket_adapter.cc index 0f68d50..27f0080 100644 --- a/jingle/glue/channel_socket_adapter.cc +++ b/jingle/glue/channel_socket_adapter.cc @@ -77,7 +77,8 @@ int TransportChannelSocketAdapter::Write( int result; if (channel_->writable()) { - result = channel_->SendPacket(buffer->data(), buffer_size); + result = channel_->SendPacket(buffer->data(), buffer_size, + talk_base::DSCP_NO_CHANGE); if (result < 0) { result = net::MapSystemError(channel_->GetError()); @@ -171,7 +172,8 @@ void TransportChannelSocketAdapter::OnWritableState( // Try to send the packet if there is a pending write. if (!write_callback_.is_null()) { int result = channel_->SendPacket(write_buffer_->data(), - write_buffer_size_); + write_buffer_size_, + talk_base::DSCP_NO_CHANGE); if (result < 0) result = net::MapSystemError(channel_->GetError()); diff --git a/jingle/glue/channel_socket_adapter_unittest.cc b/jingle/glue/channel_socket_adapter_unittest.cc index 32aa7cc..580a34d 100644 --- a/jingle/glue/channel_socket_adapter_unittest.cc +++ b/jingle/glue/channel_socket_adapter_unittest.cc @@ -34,7 +34,10 @@ class MockTransportChannel : public cricket::TransportChannel { set_readable(true); } - MOCK_METHOD3(SendPacket, int(const char* data, size_t len, int flags)); + MOCK_METHOD4(SendPacket, int(const char* data, + size_t len, + talk_base::DiffServCodePoint dscp, + int flags)); MOCK_METHOD2(SetOption, int(talk_base::Socket::Option opt, int value)); MOCK_METHOD0(GetError, int()); MOCK_CONST_METHOD0(GetIceRole, cricket::IceRole()); @@ -104,7 +107,8 @@ TEST_F(TransportChannelSocketAdapterTest, ReadClose) { TEST_F(TransportChannelSocketAdapterTest, Write) { scoped_refptr<IOBuffer> buffer(new IOBuffer(kTestDataSize)); - EXPECT_CALL(channel_, SendPacket(buffer->data(), kTestDataSize, 0)) + EXPECT_CALL(channel_, SendPacket(buffer->data(), kTestDataSize, + talk_base::DSCP_NO_CHANGE, 0)) .WillOnce(Return(kTestDataSize)); int result = target_->Write(buffer.get(), kTestDataSize, callback_); @@ -116,7 +120,8 @@ TEST_F(TransportChannelSocketAdapterTest, Write) { TEST_F(TransportChannelSocketAdapterTest, WritePending) { scoped_refptr<IOBuffer> buffer(new IOBuffer(kTestDataSize)); - EXPECT_CALL(channel_, SendPacket(buffer->data(), kTestDataSize, 0)) + EXPECT_CALL(channel_, SendPacket(buffer->data(), kTestDataSize, + talk_base::DSCP_NO_CHANGE, 0)) .Times(1) .WillOnce(Return(SOCKET_ERROR)); diff --git a/jingle/glue/fake_socket_factory.cc b/jingle/glue/fake_socket_factory.cc index c5465a6f..823367f 100644 --- a/jingle/glue/fake_socket_factory.cc +++ b/jingle/glue/fake_socket_factory.cc @@ -33,13 +33,15 @@ talk_base::SocketAddress FakeUDPPacketSocket::GetRemoteAddress() const { return remote_address_; } -int FakeUDPPacketSocket::Send(const void *data, size_t data_size) { +int FakeUDPPacketSocket::Send(const void *data, size_t data_size, + talk_base::DiffServCodePoint dscp) { DCHECK(CalledOnValidThread()); - return SendTo(data, data_size, remote_address_); + return SendTo(data, data_size, remote_address_, dscp); } int FakeUDPPacketSocket::SendTo(const void *data, size_t data_size, - const talk_base::SocketAddress& address) { + const talk_base::SocketAddress& address, + talk_base::DiffServCodePoint dscp) { DCHECK(CalledOnValidThread()); if (state_ == IS_CLOSED) { diff --git a/jingle/glue/fake_socket_factory.h b/jingle/glue/fake_socket_factory.h index cb56a3c..e9af78d 100644 --- a/jingle/glue/fake_socket_factory.h +++ b/jingle/glue/fake_socket_factory.h @@ -38,9 +38,11 @@ class FakeUDPPacketSocket : public talk_base::AsyncPacketSocket, // talk_base::AsyncPacketSocket implementation. virtual talk_base::SocketAddress GetLocalAddress() const OVERRIDE; virtual talk_base::SocketAddress GetRemoteAddress() const OVERRIDE; - virtual int Send(const void *pv, size_t cb) OVERRIDE; + virtual int Send(const void *pv, size_t cb, + talk_base::DiffServCodePoint dscp) OVERRIDE; virtual int SendTo(const void *pv, size_t cb, - const talk_base::SocketAddress& addr) OVERRIDE; + const talk_base::SocketAddress& addr, + talk_base::DiffServCodePoint dscp) OVERRIDE; virtual int Close() OVERRIDE; virtual State GetState() const OVERRIDE; virtual int GetOption(talk_base::Socket::Option opt, int* value) OVERRIDE; |