Commit e88769e4 authored by Niels Möller's avatar Niels Möller Committed by Commit Bot

Don't use rtc::PacketTime explicitly, use implicit int64_t conversion

This is a step towards deleting the rtc::PacketTime class.

Bug: webrtc:9584
Change-Id: Iaae4dd05d398fc6ea67d63981277fb84859b5c21
Reviewed-on: https://chromium-review.googlesource.com/c/1313931Reviewed-by: default avatarSergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Niels Möller <nisse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605285}
parent 73862c96
...@@ -648,9 +648,8 @@ void IpcPacketSocket::OnDataReceived(const net::IPEndPoint& address, ...@@ -648,9 +648,8 @@ void IpcPacketSocket::OnDataReceived(const net::IPEndPoint& address,
} }
} }
rtc::PacketTime packet_time(timestamp.ToInternalValue(), 0);
SignalReadPacket(this, reinterpret_cast<const char*>(&data[0]), data.size(), SignalReadPacket(this, reinterpret_cast<const char*>(&data[0]), data.size(),
address_lj, packet_time); address_lj, timestamp.since_origin().InMicroseconds());
} }
AsyncAddressResolverImpl::AsyncAddressResolverImpl( AsyncAddressResolverImpl::AsyncAddressResolverImpl(
......
...@@ -393,7 +393,7 @@ void UdpPacketSocket::HandleReadResult(int result, pp::NetAddress address) { ...@@ -393,7 +393,7 @@ void UdpPacketSocket::HandleReadResult(int result, pp::NetAddress address) {
rtc::SocketAddress socket_address; rtc::SocketAddress socket_address;
PpNetAddressToSocketAddress(address, &socket_address); PpNetAddressToSocketAddress(address, &socket_address);
SignalReadPacket(this, &receive_buffer_[0], result, socket_address, SignalReadPacket(this, &receive_buffer_[0], result, socket_address,
rtc::CreatePacketTime(0)); rtc::TimeMicros());
} else if (result != PP_ERROR_ABORTED) { } else if (result != PP_ERROR_ABORTED) {
LOG(ERROR) << "Received error when reading from UDP socket: " << result; LOG(ERROR) << "Received error when reading from UDP socket: " << result;
} }
......
...@@ -65,7 +65,7 @@ TEST_F(TransportChannelSocketAdapterTest, Read) { ...@@ -65,7 +65,7 @@ TEST_F(TransportChannelSocketAdapterTest, Read) {
ASSERT_EQ(net::ERR_IO_PENDING, result); ASSERT_EQ(net::ERR_IO_PENDING, result);
channel_.SignalReadPacket(&channel_, kTestData, kTestDataSize, channel_.SignalReadPacket(&channel_, kTestData, kTestDataSize,
rtc::CreatePacketTime(0), 0); rtc::TimeMicros(), 0);
EXPECT_EQ(kTestDataSize, callback_result_); EXPECT_EQ(kTestDataSize, callback_result_);
} }
......
...@@ -369,7 +369,7 @@ void UdpPacketSocket::HandleReadResult(int result) { ...@@ -369,7 +369,7 @@ void UdpPacketSocket::HandleReadResult(int result) {
return; return;
} }
SignalReadPacket(this, receive_buffer_->data(), result, address, SignalReadPacket(this, receive_buffer_->data(), result, address,
rtc::CreatePacketTime(0)); rtc::TimeMicros());
} else { } else {
LOG(ERROR) << "Received error when reading from UDP socket: " << result; LOG(ERROR) << "Received error when reading from UDP socket: " << result;
} }
......
...@@ -96,8 +96,7 @@ void FakeUdpSocket::ReceivePacket(const rtc::SocketAddress& from, ...@@ -96,8 +96,7 @@ void FakeUdpSocket::ReceivePacket(const rtc::SocketAddress& from,
const rtc::SocketAddress& to, const rtc::SocketAddress& to,
const scoped_refptr<net::IOBuffer>& data, const scoped_refptr<net::IOBuffer>& data,
int data_size) { int data_size) {
SignalReadPacket( SignalReadPacket(this, data->data(), data_size, from, rtc::TimeMicros());
this, data->data(), data_size, from, rtc::CreatePacketTime(0));
} }
rtc::SocketAddress FakeUdpSocket::GetLocalAddress() const { rtc::SocketAddress FakeUdpSocket::GetLocalAddress() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment