0

Revert "Update webrtc&libjingle 6774:6799."

This reverts commit bf45dff0ca.
(https://codereview.chromium.org/429253003)

Broke sizes on Linux

http://build.chromium.org/p/chromium/builders/Linux/builds/51786

https://code.google.com/p/webrtc/source/browse/trunk/webrtc/base/linux.cc
defines static std::string lsb_release_string; among other things

It's guarded in WEBRTC_CHROMIUM_BUILDs. Maybe it should be
WEBRTC_CHROMIUM_BUILD.


BUG=NONE
TBR=darin@chromium.org, hclam@chromium.org, jochen@chromium.org, palmer@chromium.org, sergeyu@chromium.org, wez@chromium.org, ronghuawu@chromium.org
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/435823002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286914 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
erikchen@chromium.org
2014-07-31 23:50:09 +00:00
parent 504cc9199a
commit d08baed84e
128 changed files with 1609 additions and 943 deletions
DEPS
content
jingle
remoting
third_party/libjingle

2
DEPS

@ -55,7 +55,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling WebRTC
# and V8 without interference from each other.
"webrtc_revision": "6799",
"webrtc_revision": "6774",
"jsoncpp_revision": "248",
"nss_revision": "277057",
# Three lines of non-changing comments so that

@ -81,18 +81,17 @@ config("libjingle_stub_config") {
]
if (is_mac) {
defines += [ "OSX", "WEBRTC_MAC" ]
defines += [ "OSX" ]
} else if (is_linux) {
defines += [ "LINUX", "WEBRTC_LINUX" ]
defines += [ "LINUX" ]
} else if (is_android) {
defines += [ "ANDROID", "WEBRTC_LINUX", "WEBRTC_ANDROID" ]
defines += [ "ANDROID" ]
} else if (is_win) {
libs = [ "secur32.lib", "crypt32.lib", "iphlpapi.lib" ]
defines += [ "WEBRTC_WIN" ]
}
if (is_posix) {
defines += [ "POSIX", "WEBRTC_POSIX" ]
defines += [ "POSIX" ]
}
if (is_chromeos) {
defines += [ "CHROMEOS" ]

@ -269,7 +269,7 @@ void P2PSocketDispatcherHost::OnAcceptIncomingTcpConnection(
void P2PSocketDispatcherHost::OnSend(int socket_id,
const net::IPEndPoint& socket_address,
const std::vector<char>& data,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint64 packet_id) {
P2PSocketHost* socket = LookupSocket(socket_id);
if (!socket) {

@ -22,7 +22,7 @@ namespace net {
class URLRequestContextGetter;
}
namespace rtc {
namespace talk_base {
struct PacketOptions;
}
@ -84,7 +84,7 @@ class P2PSocketDispatcherHost
void OnSend(int socket_id,
const net::IPEndPoint& socket_address,
const std::vector<char>& data,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint64 packet_id);
void OnSetOption(int socket_id, P2PSocketOption option, int value);
void OnDestroySocket(int socket_id);

@ -11,10 +11,10 @@
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/public/browser/browser_thread.h"
#include "crypto/hmac.h"
#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
#include "third_party/libjingle/source/talk/base/byteorder.h"
#include "third_party/libjingle/source/talk/base/messagedigest.h"
#include "third_party/libjingle/source/talk/p2p/base/stun.h"
#include "third_party/webrtc/base/asyncpacketsocket.h"
#include "third_party/webrtc/base/byteorder.h"
#include "third_party/webrtc/base/messagedigest.h"
namespace {
@ -48,7 +48,7 @@ bool IsRtcpPacket(const char* data) {
}
bool IsTurnSendIndicationPacket(const char* data) {
uint16 type = rtc::GetBE16(data);
uint16 type = talk_base::GetBE16(data);
return (type == cricket::TURN_SEND_INDICATION);
}
@ -80,7 +80,7 @@ bool ValidateRtpHeader(const char* rtp, int length, size_t* header_length) {
// Getting extension profile length.
// Length is in 32 bit words.
uint16 extn_length = rtc::GetBE16(rtp + 2) * 4;
uint16 extn_length = talk_base::GetBE16(rtp + 2) * 4;
// Verify input length against total header size.
if (rtp_hdr_len_without_extn + kRtpExtnHdrLen + extn_length > length) {
@ -129,7 +129,7 @@ void UpdateAbsSendTimeExtnValue(char* extn_data, int len,
// Assumes |len| is actual packet length + tag length. Updates HMAC at end of
// the RTP packet.
void UpdateRtpAuthTag(char* rtp, int len,
const rtc::PacketOptions& options) {
const talk_base::PacketOptions& options) {
// If there is no key, return.
if (options.packet_time_params.srtp_auth_key.empty())
return;
@ -176,7 +176,7 @@ namespace content {
namespace packet_processing_helpers {
bool ApplyPacketOptions(char* data, int length,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint32 abs_send_time) {
DCHECK(data != NULL);
DCHECK(length > 0);
@ -239,7 +239,7 @@ bool GetRtpPacketStartPositionAndLength(const char* packet,
}
rtp_begin = kTurnChannelHdrLen;
rtp_length = rtc::GetBE16(&packet[2]);
rtp_length = talk_base::GetBE16(&packet[2]);
if (length < rtp_length + kTurnChannelHdrLen) {
return false;
}
@ -249,7 +249,7 @@ bool GetRtpPacketStartPositionAndLength(const char* packet,
return false;
}
// Validate STUN message length.
int stun_msg_len = rtc::GetBE16(&packet[2]);
int stun_msg_len = talk_base::GetBE16(&packet[2]);
if (stun_msg_len + P2PSocketHost::kStunHeaderSize != length) {
return false;
}
@ -275,8 +275,8 @@ bool GetRtpPacketStartPositionAndLength(const char* packet,
// padding bits are ignored, and may be any value.
uint16 attr_type, attr_length;
// Getting attribute type and length.
attr_type = rtc::GetBE16(&packet[rtp_begin]);
attr_length = rtc::GetBE16(
attr_type = talk_base::GetBE16(&packet[rtp_begin]);
attr_length = talk_base::GetBE16(
&packet[rtp_begin + sizeof(attr_type)]);
// Checking for bogus attribute length.
if (length < attr_length + rtp_begin) {
@ -353,9 +353,9 @@ bool UpdateRtpAbsSendTimeExtn(char* rtp, int length,
rtp += rtp_hdr_len_without_extn;
// Getting extension profile ID and length.
uint16 profile_id = rtc::GetBE16(rtp);
uint16 profile_id = talk_base::GetBE16(rtp);
// Length is in 32 bit words.
uint16 extn_length = rtc::GetBE16(rtp + 2) * 4;
uint16 extn_length = talk_base::GetBE16(rtp + 2) * 4;
rtp += kRtpExtnHdrLen; // Moving past extn header.

@ -20,7 +20,7 @@ namespace net {
class URLRequestContextGetter;
}
namespace rtc {
namespace talk_base {
struct PacketOptions;
}
@ -34,7 +34,7 @@ namespace packet_processing_helpers {
// if present with current time and 2. update HMAC in RTP packet.
// If abs_send_time is 0, ApplyPacketOption will get current time from system.
CONTENT_EXPORT bool ApplyPacketOptions(char* data, int length,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint32 abs_send_time);
// Helper method which finds RTP ofset and length if the packet is encapsulated
@ -70,7 +70,7 @@ class CONTENT_EXPORT P2PSocketHost {
// Sends |data| on the socket to |to|.
virtual void Send(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint64 packet_id) = 0;
virtual P2PSocketHost* AcceptIncomingTcpConnection(

@ -18,7 +18,7 @@
#include "net/socket/tcp_client_socket.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "third_party/webrtc/base/asyncpacketsocket.h"
#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
namespace {
@ -323,7 +323,7 @@ void P2PSocketHostTcpBase::OnPacket(const std::vector<char>& data) {
// but may be honored in the future.
void P2PSocketHostTcpBase::Send(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint64 packet_id) {
if (!socket_) {
// The Send message may be sent after the an OnError message was
@ -483,7 +483,7 @@ int P2PSocketHostTcp::ProcessInput(char* input, int input_len) {
void P2PSocketHostTcp::DoSend(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options) {
const talk_base::PacketOptions& options) {
int size = kPacketHeaderSize + data.size();
scoped_refptr<net::DrainableIOBuffer> buffer =
new net::DrainableIOBuffer(new net::IOBuffer(size), size);
@ -536,7 +536,7 @@ int P2PSocketHostStunTcp::ProcessInput(char* input, int input_len) {
void P2PSocketHostStunTcp::DoSend(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options) {
const talk_base::PacketOptions& options) {
// Each packet is expected to have header (STUN/TURN ChannelData), where
// header contains message type and and length of message.
if (data.size() < kPacketHeaderSize + kPacketLengthOffset) {

@ -42,7 +42,7 @@ class CONTENT_EXPORT P2PSocketHostTcpBase : public P2PSocketHost {
const P2PHostAndIPEndPoint& remote_address) OVERRIDE;
virtual void Send(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint64 packet_id) OVERRIDE;
virtual P2PSocketHost* AcceptIncomingTcpConnection(
const net::IPEndPoint& remote_address, int id) OVERRIDE;
@ -53,7 +53,7 @@ class CONTENT_EXPORT P2PSocketHostTcpBase : public P2PSocketHost {
virtual int ProcessInput(char* input, int input_len) = 0;
virtual void DoSend(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options) = 0;
const talk_base::PacketOptions& options) = 0;
void WriteOrQueue(scoped_refptr<net::DrainableIOBuffer>& buffer);
void OnPacket(const std::vector<char>& data);
@ -110,7 +110,7 @@ class CONTENT_EXPORT P2PSocketHostTcp : public P2PSocketHostTcpBase {
virtual int ProcessInput(char* input, int input_len) OVERRIDE;
virtual void DoSend(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options) OVERRIDE;
const talk_base::PacketOptions& options) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcp);
};
@ -132,7 +132,7 @@ class CONTENT_EXPORT P2PSocketHostStunTcp : public P2PSocketHostTcpBase {
virtual int ProcessInput(char* input, int input_len) OVERRIDE;
virtual void DoSend(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options) OVERRIDE;
const talk_base::PacketOptions& options) OVERRIDE;
private:
int GetExpectedPacketSize(const char* data, int len, int* pad_bytes);

@ -119,7 +119,7 @@ void P2PSocketHostTcpServer::OnAccepted(int result) {
void P2PSocketHostTcpServer::Send(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint64 packet_id) {
NOTREACHED();
OnError();

@ -38,7 +38,7 @@ class CONTENT_EXPORT P2PSocketHostTcpServer : public P2PSocketHost {
const P2PHostAndIPEndPoint& remote_address) OVERRIDE;
virtual void Send(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint64 packet_id) OVERRIDE;
virtual P2PSocketHost* AcceptIncomingTcpConnection(
const net::IPEndPoint& remote_address, int id) OVERRIDE;

@ -89,7 +89,7 @@ TEST_F(P2PSocketHostTcpTest, SendStunNoAuth) {
.Times(3)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest_.ip_address, packet1, options, 0);
@ -121,7 +121,7 @@ TEST_F(P2PSocketHostTcpTest, ReceiveStun) {
.Times(3)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest_.ip_address, packet1, options, 0);
@ -168,7 +168,7 @@ TEST_F(P2PSocketHostTcpTest, SendDataNoAuth) {
MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest_.ip_address, packet, options, 0);
@ -194,7 +194,7 @@ TEST_F(P2PSocketHostTcpTest, SendAfterStunRequest) {
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
socket_->AppendInputData(&received_data[0], received_data.size());
rtc::PacketOptions options;
talk_base::PacketOptions options;
// Now we should be able to send any data to |dest_|.
std::vector<char> packet;
CreateRandomPacket(&packet);
@ -218,7 +218,7 @@ TEST_F(P2PSocketHostTcpTest, AsyncWrites) {
.Times(2)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
@ -254,7 +254,7 @@ TEST_F(P2PSocketHostTcpTest, SendDataWithPacketOptions) {
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
socket_->AppendInputData(&received_data[0], received_data.size());
rtc::PacketOptions options;
talk_base::PacketOptions options;
options.packet_time_params.rtp_sendtime_extension_id = 3;
// Now we should be able to send any data to |dest_|.
std::vector<char> packet;
@ -278,7 +278,7 @@ TEST_F(P2PSocketHostStunTcpTest, SendStunNoAuth) {
.Times(3)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest_.ip_address, packet1, options, 0);
@ -307,7 +307,7 @@ TEST_F(P2PSocketHostStunTcpTest, ReceiveStun) {
.Times(3)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest_.ip_address, packet1, options, 0);
@ -351,7 +351,7 @@ TEST_F(P2PSocketHostStunTcpTest, SendDataNoAuth) {
MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest_.ip_address, packet, options, 0);
@ -370,7 +370,7 @@ TEST_F(P2PSocketHostStunTcpTest, AsyncWrites) {
.Times(2)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest_.ip_address, packet1, options, 0);

@ -3,8 +3,8 @@
// found in the LICENSE file.
#include "content/browser/renderer_host/p2p/socket_host_throttler.h"
#include "third_party/webrtc/base/ratelimiter.h"
#include "third_party/webrtc/base/timing.h"
#include "third_party/libjingle/source/talk/base/ratelimiter.h"
#include "third_party/libjingle/source/talk/base/timing.h"
namespace content {
@ -16,19 +16,19 @@ const int kMaxIceMessageBandwidth = 256 * 1024;
P2PMessageThrottler::P2PMessageThrottler()
: timing_(new rtc::Timing()),
rate_limiter_(new rtc::RateLimiter(kMaxIceMessageBandwidth, 1.0)) {
: timing_(new talk_base::Timing()),
rate_limiter_(new talk_base::RateLimiter(kMaxIceMessageBandwidth, 1.0)) {
}
P2PMessageThrottler::~P2PMessageThrottler() {
}
void P2PMessageThrottler::SetTiming(scoped_ptr<rtc::Timing> timing) {
void P2PMessageThrottler::SetTiming(scoped_ptr<talk_base::Timing> timing) {
timing_ = timing.Pass();
}
void P2PMessageThrottler::SetSendIceBandwidth(int bandwidth_kbps) {
rate_limiter_.reset(new rtc::RateLimiter(bandwidth_kbps, 1.0));
rate_limiter_.reset(new talk_base::RateLimiter(bandwidth_kbps, 1.0));
}
bool P2PMessageThrottler::DropNextPacket(size_t packet_len) {

@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
namespace rtc {
namespace talk_base {
class RateLimiter;
class Timing;
}
@ -24,13 +24,13 @@ class CONTENT_EXPORT P2PMessageThrottler {
P2PMessageThrottler();
virtual ~P2PMessageThrottler();
void SetTiming(scoped_ptr<rtc::Timing> timing);
void SetTiming(scoped_ptr<talk_base::Timing> timing);
bool DropNextPacket(size_t packet_len);
void SetSendIceBandwidth(int bandwith_kbps);
private:
scoped_ptr<rtc::Timing> timing_;
scoped_ptr<rtc::RateLimiter> rate_limiter_;
scoped_ptr<talk_base::Timing> timing_;
scoped_ptr<talk_base::RateLimiter> rate_limiter_;
DISALLOW_COPY_AND_ASSIGN(P2PMessageThrottler);
};

@ -15,7 +15,7 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "third_party/webrtc/base/asyncpacketsocket.h"
#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
namespace {
@ -52,7 +52,7 @@ namespace content {
P2PSocketHostUdp::PendingPacket::PendingPacket(
const net::IPEndPoint& to,
const std::vector<char>& content,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint64 id)
: to(to),
data(new net::IOBuffer(content.size())),
@ -186,7 +186,7 @@ void P2PSocketHostUdp::HandleReadResult(int result) {
void P2PSocketHostUdp::Send(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint64 packet_id) {
if (!socket_) {
// The Send message may be sent after the an OnError message was

@ -18,7 +18,7 @@
#include "content/common/p2p_socket_type.h"
#include "net/base/ip_endpoint.h"
#include "net/udp/udp_server_socket.h"
#include "third_party/webrtc/base/asyncpacketsocket.h"
#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
namespace content {
@ -36,7 +36,7 @@ class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost {
const P2PHostAndIPEndPoint& remote_address) OVERRIDE;
virtual void Send(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint64 packet_id) OVERRIDE;
virtual P2PSocketHost* AcceptIncomingTcpConnection(
const net::IPEndPoint& remote_address, int id) OVERRIDE;
@ -50,13 +50,13 @@ class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost {
struct PendingPacket {
PendingPacket(const net::IPEndPoint& to,
const std::vector<char>& content,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
uint64 id);
~PendingPacket();
net::IPEndPoint to;
scoped_refptr<net::IOBuffer> data;
int size;
rtc::PacketOptions packet_options;
talk_base::PacketOptions packet_options;
uint64 id;
};

@ -17,7 +17,7 @@
#include "net/udp/datagram_server_socket.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/base/timing.h"
#include "third_party/libjingle/source/talk/base/timing.h"
using ::testing::_;
using ::testing::DeleteArg;
@ -26,7 +26,7 @@ using ::testing::Return;
namespace {
class FakeTiming : public rtc::Timing {
class FakeTiming : public talk_base::Timing {
public:
FakeTiming() : now_(0.0) {}
virtual double TimerNow() OVERRIDE { return now_; }
@ -197,7 +197,7 @@ class P2PSocketHostUdpTest : public testing::Test {
dest1_ = ParseAddress(kTestIpAddress1, kTestPort1);
dest2_ = ParseAddress(kTestIpAddress2, kTestPort2);
scoped_ptr<rtc::Timing> timing(new FakeTiming());
scoped_ptr<talk_base::Timing> timing(new FakeTiming());
throttler_.SetTiming(timing.Pass());
}
@ -221,7 +221,7 @@ TEST_F(P2PSocketHostUdpTest, SendStunNoAuth) {
.Times(3)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest1_, packet1, options, 0);
@ -247,7 +247,7 @@ TEST_F(P2PSocketHostUdpTest, SendDataNoAuth) {
MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest1_, packet, options, 0);
@ -271,7 +271,7 @@ TEST_F(P2PSocketHostUdpTest, SendAfterStunRequest) {
MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest1_, packet, options, 0);
@ -296,7 +296,7 @@ TEST_F(P2PSocketHostUdpTest, SendAfterStunResponse) {
MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest1_, packet, options, 0);
@ -317,7 +317,7 @@ TEST_F(P2PSocketHostUdpTest, SendAfterStunResponseDifferentHost) {
socket_->ReceivePacket(dest1_, request_packet);
// Should fail when trying to send the same packet to |dest2_|.
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
EXPECT_CALL(sender_, Send(
@ -334,7 +334,7 @@ TEST_F(P2PSocketHostUdpTest, ThrottleAfterLimit) {
.Times(2)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
throttler_.SetSendIceBandwidth(packet1.size() * 2);
@ -363,7 +363,7 @@ TEST_F(P2PSocketHostUdpTest, ThrottleAfterLimitAfterReceive) {
.Times(4)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
throttler_.SetSendIceBandwidth(packet1.size());

@ -297,7 +297,7 @@ TEST(P2PSocketHostTest, TestUpdateAbsSendTimeExtensionInTurnSendIndication) {
// without HMAC value in the packet.
TEST(P2PSocketHostTest, TestApplyPacketOptionsWithDefaultValues) {
unsigned char fake_tag[4] = { 0xba, 0xdd, 0xba, 0xdd };
rtc::PacketOptions options;
talk_base::PacketOptions options;
std::vector<char> rtp_packet;
rtp_packet.resize(sizeof(kRtpMsgWithAbsSendTimeExtension) + 4); // tag length
memcpy(&rtp_packet[0], kRtpMsgWithAbsSendTimeExtension,
@ -317,7 +317,7 @@ TEST(P2PSocketHostTest, TestApplyPacketOptionsWithDefaultValues) {
// Veirfy HMAC is updated when packet option parameters are set.
TEST(P2PSocketHostTest, TestApplyPacketOptionsWithAuthParams) {
rtc::PacketOptions options;
talk_base::PacketOptions options;
options.packet_time_params.srtp_auth_key.resize(20);
options.packet_time_params.srtp_auth_key.assign(
kTestKey, kTestKey + sizeof(kTestKey));
@ -348,7 +348,7 @@ TEST(P2PSocketHostTest, TestUpdateAbsSendTimeExtensionInRtpPacket) {
// Verify we update both AbsSendTime extension header and HMAC.
TEST(P2PSocketHostTest, TestApplyPacketOptionsWithAuthParamsAndAbsSendTime) {
rtc::PacketOptions options;
talk_base::PacketOptions options;
options.packet_time_params.srtp_auth_key.resize(20);
options.packet_time_params.srtp_auth_key.assign(
kTestKey, kTestKey + sizeof(kTestKey));

@ -10,7 +10,7 @@
#include "content/common/p2p_socket_type.h"
#include "ipc/ipc_message_macros.h"
#include "net/base/net_util.h"
#include "third_party/webrtc/base/asyncpacketsocket.h"
#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
@ -20,9 +20,9 @@ IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketType,
content::P2P_SOCKET_TYPE_LAST)
IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketOption,
content::P2P_SOCKET_OPT_MAX - 1)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(rtc::DiffServCodePoint,
rtc::DSCP_NO_CHANGE,
rtc::DSCP_CS7)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(talk_base::DiffServCodePoint,
talk_base::DSCP_NO_CHANGE,
talk_base::DSCP_CS7)
IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface)
IPC_STRUCT_TRAITS_MEMBER(name)
@ -30,14 +30,14 @@ IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface)
IPC_STRUCT_TRAITS_MEMBER(address)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(rtc::PacketTimeUpdateParams)
IPC_STRUCT_TRAITS_BEGIN(talk_base::PacketTimeUpdateParams)
IPC_STRUCT_TRAITS_MEMBER(rtp_sendtime_extension_id)
IPC_STRUCT_TRAITS_MEMBER(srtp_auth_key)
IPC_STRUCT_TRAITS_MEMBER(srtp_auth_tag_len)
IPC_STRUCT_TRAITS_MEMBER(srtp_packet_index)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(rtc::PacketOptions)
IPC_STRUCT_TRAITS_BEGIN(talk_base::PacketOptions)
IPC_STRUCT_TRAITS_MEMBER(dscp)
IPC_STRUCT_TRAITS_MEMBER(packet_time_params)
IPC_STRUCT_TRAITS_END()
@ -104,7 +104,7 @@ IPC_MESSAGE_CONTROL5(P2PHostMsg_Send,
int /* socket_id */,
net::IPEndPoint /* socket_address */,
std::vector<char> /* data */,
rtc::PacketOptions /* packet options */,
talk_base::PacketOptions /* packet options */,
uint64 /* packet_id */)
IPC_MESSAGE_CONTROL1(P2PHostMsg_DestroySocket,

@ -162,7 +162,7 @@ TEST_F(MediaStreamAudioProcessorTest, WithoutAudioProcessing) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
new rtc::RefCountedObject<MediaStreamAudioProcessor>(
new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_FALSE(audio_processor->has_audio_processing());
@ -182,7 +182,7 @@ TEST_F(MediaStreamAudioProcessorTest, WithAudioProcessing) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
new rtc::RefCountedObject<MediaStreamAudioProcessor>(
new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_TRUE(audio_processor->has_audio_processing());
@ -207,7 +207,7 @@ TEST_F(MediaStreamAudioProcessorTest, VerifyTabCaptureWithoutAudioProcessing) {
tab_constraint_factory.AddMandatory(kMediaStreamSource,
tab_string);
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
new rtc::RefCountedObject<MediaStreamAudioProcessor>(
new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
tab_constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_FALSE(audio_processor->has_audio_processing());
@ -224,7 +224,7 @@ TEST_F(MediaStreamAudioProcessorTest, VerifyTabCaptureWithoutAudioProcessing) {
const std::string system_string = kMediaStreamSourceSystem;
system_constraint_factory.AddMandatory(kMediaStreamSource,
system_string);
audio_processor = new rtc::RefCountedObject<MediaStreamAudioProcessor>(
audio_processor = new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
system_constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get());
EXPECT_FALSE(audio_processor->has_audio_processing());
@ -241,7 +241,7 @@ TEST_F(MediaStreamAudioProcessorTest, TurnOffDefaultConstraints) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
new rtc::RefCountedObject<MediaStreamAudioProcessor>(
new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_FALSE(audio_processor->has_audio_processing());
@ -357,7 +357,7 @@ TEST_F(MediaStreamAudioProcessorTest, TestAllSampleRates) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
new rtc::RefCountedObject<MediaStreamAudioProcessor>(
new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_TRUE(audio_processor->has_audio_processing());
@ -398,7 +398,7 @@ TEST_F(MediaStreamAudioProcessorTest, GetAecDumpMessageFilter) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
new rtc::RefCountedObject<MediaStreamAudioProcessor>(
new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
@ -418,7 +418,7 @@ TEST_F(MediaStreamAudioProcessorTest, TestStereoAudio) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
new rtc::RefCountedObject<MediaStreamAudioProcessor>(
new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_FALSE(audio_processor->has_audio_processing());

@ -75,7 +75,7 @@ class MockStreamCollection : public webrtc::StreamCollectionInterface {
virtual ~MockStreamCollection() {}
private:
typedef std::vector<rtc::scoped_refptr<MediaStreamInterface> >
typedef std::vector<talk_base::scoped_refptr<MediaStreamInterface> >
StreamVector;
StreamVector streams_;
};
@ -194,7 +194,7 @@ class MockDtmfSender : public DtmfSenderInterface {
virtual ~MockDtmfSender() {}
private:
rtc::scoped_refptr<AudioTrackInterface> track_;
talk_base::scoped_refptr<AudioTrackInterface> track_;
DtmfSenderObserverInterface* observer_;
std::string tones_;
int duration_;
@ -207,8 +207,8 @@ const char MockPeerConnectionImpl::kDummyAnswer[] = "dummy answer";
MockPeerConnectionImpl::MockPeerConnectionImpl(
MockPeerConnectionDependencyFactory* factory)
: dependency_factory_(factory),
local_streams_(new rtc::RefCountedObject<MockStreamCollection>),
remote_streams_(new rtc::RefCountedObject<MockStreamCollection>),
local_streams_(new talk_base::RefCountedObject<MockStreamCollection>),
remote_streams_(new talk_base::RefCountedObject<MockStreamCollection>),
hint_audio_(false),
hint_video_(false),
getstats_result_(true),
@ -221,12 +221,12 @@ MockPeerConnectionImpl::MockPeerConnectionImpl(
MockPeerConnectionImpl::~MockPeerConnectionImpl() {}
rtc::scoped_refptr<webrtc::StreamCollectionInterface>
talk_base::scoped_refptr<webrtc::StreamCollectionInterface>
MockPeerConnectionImpl::local_streams() {
return local_streams_;
}
rtc::scoped_refptr<webrtc::StreamCollectionInterface>
talk_base::scoped_refptr<webrtc::StreamCollectionInterface>
MockPeerConnectionImpl::remote_streams() {
return remote_streams_;
}
@ -247,18 +247,18 @@ void MockPeerConnectionImpl::RemoveStream(
local_streams_->RemoveStream(local_stream);
}
rtc::scoped_refptr<DtmfSenderInterface>
talk_base::scoped_refptr<DtmfSenderInterface>
MockPeerConnectionImpl::CreateDtmfSender(AudioTrackInterface* track) {
if (!track) {
return NULL;
}
return new rtc::RefCountedObject<MockDtmfSender>(track);
return new talk_base::RefCountedObject<MockDtmfSender>(track);
}
rtc::scoped_refptr<webrtc::DataChannelInterface>
talk_base::scoped_refptr<webrtc::DataChannelInterface>
MockPeerConnectionImpl::CreateDataChannel(const std::string& label,
const webrtc::DataChannelInit* config) {
return new rtc::RefCountedObject<MockDataChannel>(label, config);
return new talk_base::RefCountedObject<MockDataChannel>(label, config);
}
bool MockPeerConnectionImpl::GetStats(

@ -24,18 +24,18 @@ class MockPeerConnectionImpl : public webrtc::PeerConnectionInterface {
explicit MockPeerConnectionImpl(MockPeerConnectionDependencyFactory* factory);
// PeerConnectionInterface implementation.
virtual rtc::scoped_refptr<webrtc::StreamCollectionInterface>
virtual talk_base::scoped_refptr<webrtc::StreamCollectionInterface>
local_streams() OVERRIDE;
virtual rtc::scoped_refptr<webrtc::StreamCollectionInterface>
virtual talk_base::scoped_refptr<webrtc::StreamCollectionInterface>
remote_streams() OVERRIDE;
virtual bool AddStream(
webrtc::MediaStreamInterface* local_stream,
const webrtc::MediaConstraintsInterface* constraints) OVERRIDE;
virtual void RemoveStream(
webrtc::MediaStreamInterface* local_stream) OVERRIDE;
virtual rtc::scoped_refptr<webrtc::DtmfSenderInterface>
virtual talk_base::scoped_refptr<webrtc::DtmfSenderInterface>
CreateDtmfSender(webrtc::AudioTrackInterface* track) OVERRIDE;
virtual rtc::scoped_refptr<webrtc::DataChannelInterface>
virtual talk_base::scoped_refptr<webrtc::DataChannelInterface>
CreateDataChannel(const std::string& label,
const webrtc::DataChannelInit* config) OVERRIDE;
@ -124,8 +124,8 @@ class MockPeerConnectionImpl : public webrtc::PeerConnectionInterface {
MockPeerConnectionDependencyFactory* dependency_factory_;
std::string stream_label_;
rtc::scoped_refptr<MockStreamCollection> local_streams_;
rtc::scoped_refptr<MockStreamCollection> remote_streams_;
talk_base::scoped_refptr<MockStreamCollection> local_streams_;
talk_base::scoped_refptr<MockStreamCollection> remote_streams_;
scoped_ptr<webrtc::SessionDescriptionInterface> local_desc_;
scoped_ptr<webrtc::SessionDescriptionInterface> remote_desc_;
scoped_ptr<webrtc::SessionDescriptionInterface> created_sessiondescription_;

@ -38,7 +38,7 @@ class PeerConnectionIdentityService
// The origin of the DTLS connection.
GURL origin_;
rtc::scoped_refptr<webrtc::DTLSIdentityRequestObserver>
talk_base::scoped_refptr<webrtc::DTLSIdentityRequestObserver>
pending_observer_;
int pending_request_id_;

@ -287,8 +287,8 @@ void PeerConnectionTracker::OnGetAllStats() {
for (PeerConnectionIdMap::iterator it = peer_connection_id_map_.begin();
it != peer_connection_id_map_.end(); ++it) {
rtc::scoped_refptr<InternalStatsObserver> observer(
new rtc::RefCountedObject<InternalStatsObserver>(it->second));
talk_base::scoped_refptr<InternalStatsObserver> observer(
new talk_base::RefCountedObject<InternalStatsObserver>(it->second));
it->first->GetStats(
observer,

@ -103,14 +103,14 @@ unsigned long RtcDataChannelHandler::bufferedAmount() {
bool RtcDataChannelHandler::sendStringData(const blink::WebString& data) {
std::string utf8_buffer = base::UTF16ToUTF8(data);
rtc::Buffer buffer(utf8_buffer.c_str(), utf8_buffer.length());
talk_base::Buffer buffer(utf8_buffer.c_str(), utf8_buffer.length());
webrtc::DataBuffer data_buffer(buffer, false);
RecordMessageSent(data_buffer.size());
return channel_->Send(data_buffer);
}
bool RtcDataChannelHandler::sendRawData(const char* data, size_t length) {
rtc::Buffer buffer(data, length);
talk_base::Buffer buffer(data, length);
webrtc::DataBuffer data_buffer(buffer, true);
RecordMessageSent(data_buffer.size());
return channel_->Send(data_buffer);

@ -292,8 +292,8 @@ class StatsResponse : public webrtc::StatsObserver {
blink::WebString::fromUTF8(value));
}
rtc::scoped_refptr<LocalRTCStatsRequest> request_;
rtc::scoped_refptr<LocalRTCStatsResponse> response_;
talk_base::scoped_refptr<LocalRTCStatsRequest> request_;
talk_base::scoped_refptr<LocalRTCStatsResponse> response_;
};
// Implementation of LocalRTCStatsRequest.
@ -315,7 +315,7 @@ blink::WebMediaStreamTrack LocalRTCStatsRequest::component() const {
scoped_refptr<LocalRTCStatsResponse> LocalRTCStatsRequest::createResponse() {
DCHECK(!response_);
response_ = new rtc::RefCountedObject<LocalRTCStatsResponse>(
response_ = new talk_base::RefCountedObject<LocalRTCStatsResponse>(
impl_.createResponse());
return response_.get();
}
@ -472,7 +472,7 @@ bool RTCPeerConnectionHandler::initialize(
peer_connection_tracker_->RegisterPeerConnection(
this, config, constraints, frame_);
uma_observer_ = new rtc::RefCountedObject<PeerConnectionUMAObserver>();
uma_observer_ = new talk_base::RefCountedObject<PeerConnectionUMAObserver>();
native_peer_connection_->RegisterUMAObserver(uma_observer_.get());
return true;
}
@ -500,7 +500,7 @@ void RTCPeerConnectionHandler::createOffer(
const blink::WebRTCSessionDescriptionRequest& request,
const blink::WebMediaConstraints& options) {
scoped_refptr<CreateSessionDescriptionRequest> description_request(
new rtc::RefCountedObject<CreateSessionDescriptionRequest>(
new talk_base::RefCountedObject<CreateSessionDescriptionRequest>(
request, this, PeerConnectionTracker::ACTION_CREATE_OFFER));
RTCMediaConstraints constraints(options);
native_peer_connection_->CreateOffer(description_request.get(), &constraints);
@ -513,7 +513,7 @@ void RTCPeerConnectionHandler::createOffer(
const blink::WebRTCSessionDescriptionRequest& request,
const blink::WebRTCOfferOptions& options) {
scoped_refptr<CreateSessionDescriptionRequest> description_request(
new rtc::RefCountedObject<CreateSessionDescriptionRequest>(
new talk_base::RefCountedObject<CreateSessionDescriptionRequest>(
request, this, PeerConnectionTracker::ACTION_CREATE_OFFER));
RTCMediaConstraints constraints;
@ -528,7 +528,7 @@ void RTCPeerConnectionHandler::createAnswer(
const blink::WebRTCSessionDescriptionRequest& request,
const blink::WebMediaConstraints& options) {
scoped_refptr<CreateSessionDescriptionRequest> description_request(
new rtc::RefCountedObject<CreateSessionDescriptionRequest>(
new talk_base::RefCountedObject<CreateSessionDescriptionRequest>(
request, this, PeerConnectionTracker::ACTION_CREATE_ANSWER));
RTCMediaConstraints constraints(options);
native_peer_connection_->CreateAnswer(description_request.get(),
@ -558,7 +558,7 @@ void RTCPeerConnectionHandler::setLocalDescription(
this, description, PeerConnectionTracker::SOURCE_LOCAL);
scoped_refptr<SetSessionDescriptionRequest> set_request(
new rtc::RefCountedObject<SetSessionDescriptionRequest>(
new talk_base::RefCountedObject<SetSessionDescriptionRequest>(
request, this, PeerConnectionTracker::ACTION_SET_LOCAL_DESCRIPTION));
native_peer_connection_->SetLocalDescription(set_request.get(), native_desc);
}
@ -583,7 +583,7 @@ void RTCPeerConnectionHandler::setRemoteDescription(
this, description, PeerConnectionTracker::SOURCE_REMOTE);
scoped_refptr<SetSessionDescriptionRequest> set_request(
new rtc::RefCountedObject<SetSessionDescriptionRequest>(
new talk_base::RefCountedObject<SetSessionDescriptionRequest>(
request, this, PeerConnectionTracker::ACTION_SET_REMOTE_DESCRIPTION));
native_peer_connection_->SetRemoteDescription(set_request.get(), native_desc);
}
@ -728,13 +728,13 @@ void RTCPeerConnectionHandler::removeStream(
void RTCPeerConnectionHandler::getStats(
const blink::WebRTCStatsRequest& request) {
scoped_refptr<LocalRTCStatsRequest> inner_request(
new rtc::RefCountedObject<LocalRTCStatsRequest>(request));
new talk_base::RefCountedObject<LocalRTCStatsRequest>(request));
getStats(inner_request.get());
}
void RTCPeerConnectionHandler::getStats(LocalRTCStatsRequest* request) {
rtc::scoped_refptr<webrtc::StatsObserver> observer(
new rtc::RefCountedObject<StatsResponse>(request));
talk_base::scoped_refptr<webrtc::StatsObserver> observer(
new talk_base::RefCountedObject<StatsResponse>(request));
webrtc::MediaStreamTrackInterface* track = NULL;
if (request->hasSelector()) {
blink::WebMediaStreamSource::Type type =
@ -798,7 +798,7 @@ blink::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel(
config.maxRetransmitTime = init.maxRetransmitTime;
config.protocol = base::UTF16ToUTF8(init.protocol);
rtc::scoped_refptr<webrtc::DataChannelInterface> webrtc_channel(
talk_base::scoped_refptr<webrtc::DataChannelInterface> webrtc_channel(
native_peer_connection_->CreateDataChannel(base::UTF16ToUTF8(label),
&config));
if (!webrtc_channel) {
@ -826,7 +826,7 @@ blink::WebRTCDTMFSenderHandler* RTCPeerConnectionHandler::createDTMFSender(
}
webrtc::AudioTrackInterface* audio_track = native_track->GetAudioAdapter();
rtc::scoped_refptr<webrtc::DtmfSenderInterface> sender(
talk_base::scoped_refptr<webrtc::DtmfSenderInterface> sender(
native_peer_connection_->CreateDtmfSender(audio_track));
if (!sender) {
DLOG(ERROR) << "Could not create native DTMF sender.";

@ -33,7 +33,7 @@ class WebRtcMediaStreamAdapter;
// Mockable wrapper for blink::WebRTCStatsResponse
class CONTENT_EXPORT LocalRTCStatsResponse
: public NON_EXPORTED_BASE(rtc::RefCountInterface) {
: public NON_EXPORTED_BASE(talk_base::RefCountInterface) {
public:
explicit LocalRTCStatsResponse(const blink::WebRTCStatsResponse& impl)
: impl_(impl) {
@ -56,7 +56,7 @@ class CONTENT_EXPORT LocalRTCStatsResponse
// Mockable wrapper for blink::WebRTCStatsRequest
class CONTENT_EXPORT LocalRTCStatsRequest
: public NON_EXPORTED_BASE(rtc::RefCountInterface) {
: public NON_EXPORTED_BASE(talk_base::RefCountInterface) {
public:
explicit LocalRTCStatsRequest(blink::WebRTCStatsRequest impl);
// Constructor for testing.
@ -72,7 +72,7 @@ class CONTENT_EXPORT LocalRTCStatsRequest
private:
blink::WebRTCStatsRequest impl_;
rtc::scoped_refptr<LocalRTCStatsResponse> response_;
talk_base::scoped_refptr<LocalRTCStatsResponse> response_;
};
// RTCPeerConnectionHandler is a delegate for the RTC PeerConnection API

@ -93,7 +93,7 @@ class MockRTCStatsRequest : public LocalRTCStatsRequest {
}
virtual scoped_refptr<LocalRTCStatsResponse> createResponse() OVERRIDE {
DCHECK(!response_.get());
response_ = new rtc::RefCountedObject<MockRTCStatsResponse>();
response_ = new talk_base::RefCountedObject<MockRTCStatsResponse>();
return response_;
}
@ -459,7 +459,7 @@ TEST_F(RTCPeerConnectionHandlerTest, addStreamWithStoppedAudioAndVideoTrack) {
TEST_F(RTCPeerConnectionHandlerTest, GetStatsNoSelector) {
scoped_refptr<MockRTCStatsRequest> request(
new rtc::RefCountedObject<MockRTCStatsRequest>());
new talk_base::RefCountedObject<MockRTCStatsRequest>());
pc_handler_->getStats(request.get());
// Note that callback gets executed synchronously by mock.
ASSERT_TRUE(request->result());
@ -468,7 +468,7 @@ TEST_F(RTCPeerConnectionHandlerTest, GetStatsNoSelector) {
TEST_F(RTCPeerConnectionHandlerTest, GetStatsAfterClose) {
scoped_refptr<MockRTCStatsRequest> request(
new rtc::RefCountedObject<MockRTCStatsRequest>());
new talk_base::RefCountedObject<MockRTCStatsRequest>());
pc_handler_->stop();
pc_handler_->getStats(request.get());
// Note that callback gets executed synchronously by mock.
@ -486,7 +486,7 @@ TEST_F(RTCPeerConnectionHandlerTest, GetStatsWithLocalSelector) {
ASSERT_LE(1ul, tracks.size());
scoped_refptr<MockRTCStatsRequest> request(
new rtc::RefCountedObject<MockRTCStatsRequest>());
new talk_base::RefCountedObject<MockRTCStatsRequest>());
request->setSelector(tracks[0]);
pc_handler_->getStats(request.get());
EXPECT_EQ(1, request->result()->report_count());
@ -503,7 +503,7 @@ TEST_F(RTCPeerConnectionHandlerTest, GetStatsWithRemoteSelector) {
ASSERT_LE(1ul, tracks.size());
scoped_refptr<MockRTCStatsRequest> request(
new rtc::RefCountedObject<MockRTCStatsRequest>());
new talk_base::RefCountedObject<MockRTCStatsRequest>());
request->setSelector(tracks[0]);
pc_handler_->getStats(request.get());
EXPECT_EQ(1, request->result()->report_count());
@ -522,7 +522,7 @@ TEST_F(RTCPeerConnectionHandlerTest, GetStatsWithBadSelector) {
mock_peer_connection_->SetGetStatsResult(false);
scoped_refptr<MockRTCStatsRequest> request(
new rtc::RefCountedObject<MockRTCStatsRequest>());
new talk_base::RefCountedObject<MockRTCStatsRequest>());
request->setSelector(component);
pc_handler_->getStats(request.get());
EXPECT_EQ(0, request->result()->report_count());

@ -72,7 +72,7 @@ void MediaStreamRemoteVideoSource::
RemoteVideoSourceDelegate::RenderFrame(
const cricket::VideoFrame* frame) {
base::TimeDelta timestamp = base::TimeDelta::FromMicroseconds(
frame->GetElapsedTime() / rtc::kNumNanosecsPerMicrosec);
frame->GetElapsedTime() / talk_base::kNumNanosecsPerMicrosec);
scoped_refptr<media::VideoFrame> video_frame;
if (frame->GetNativeHandle() != NULL) {

@ -42,9 +42,9 @@ class MediaStreamTrackMetricsObserver : public webrtc::ObserverInterface {
virtual void OnChanged() OVERRIDE;
template <class T>
IdSet GetTrackIds(const std::vector<rtc::scoped_refptr<T> >& tracks) {
IdSet GetTrackIds(const std::vector<talk_base::scoped_refptr<T> >& tracks) {
IdSet track_ids;
typename std::vector<rtc::scoped_refptr<T> >::const_iterator it =
typename std::vector<talk_base::scoped_refptr<T> >::const_iterator it =
tracks.begin();
for (; it != tracks.end(); ++it) {
track_ids.insert((*it)->id());
@ -72,7 +72,7 @@ class MediaStreamTrackMetricsObserver : public webrtc::ObserverInterface {
IdSet video_track_ids_;
MediaStreamTrackMetrics::StreamType stream_type_;
rtc::scoped_refptr<MediaStreamInterface> stream_;
talk_base::scoped_refptr<MediaStreamInterface> stream_;
// Non-owning.
MediaStreamTrackMetrics* owner_;

@ -80,7 +80,7 @@ class MediaStreamTrackMetricsTest : public testing::Test {
public:
virtual void SetUp() OVERRIDE {
metrics_.reset(new MockMediaStreamTrackMetrics());
stream_ = new rtc::RefCountedObject<MockMediaStream>("stream");
stream_ = new talk_base::RefCountedObject<MockMediaStream>("stream");
}
virtual void TearDown() OVERRIDE {
@ -89,11 +89,11 @@ class MediaStreamTrackMetricsTest : public testing::Test {
}
scoped_refptr<MockAudioTrackInterface> MakeAudioTrack(std::string id) {
return new rtc::RefCountedObject<MockAudioTrackInterface>(id);
return new talk_base::RefCountedObject<MockAudioTrackInterface>(id);
}
scoped_refptr<MockVideoTrackInterface> MakeVideoTrack(std::string id) {
return new rtc::RefCountedObject<MockVideoTrackInterface>(id);
return new talk_base::RefCountedObject<MockVideoTrackInterface>(id);
}
scoped_ptr<MockMediaStreamTrackMetrics> metrics_;

@ -14,8 +14,8 @@
#include "content/renderer/media/webrtc_local_audio_track.h"
#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
#include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
#include "third_party/libjingle/source/talk/base/scoped_ref_ptr.h"
#include "third_party/libjingle/source/talk/media/base/videocapturer.h"
#include "third_party/webrtc/base/scoped_ref_ptr.h"
using webrtc::AudioSourceInterface;
using webrtc::AudioTrackInterface;
@ -90,13 +90,13 @@ VideoTrackVector MockMediaStream::GetVideoTracks() {
return video_track_vector_;
}
rtc::scoped_refptr<AudioTrackInterface> MockMediaStream::FindAudioTrack(
talk_base::scoped_refptr<AudioTrackInterface> MockMediaStream::FindAudioTrack(
const std::string& track_id) {
AudioTrackVector::iterator it = FindTrack(&audio_track_vector_, track_id);
return it == audio_track_vector_.end() ? NULL : *it;
}
rtc::scoped_refptr<VideoTrackInterface> MockMediaStream::FindVideoTrack(
talk_base::scoped_refptr<VideoTrackInterface> MockMediaStream::FindVideoTrack(
const std::string& track_id) {
VideoTrackVector::iterator it = FindTrack(&video_track_vector_, track_id);
return it == video_track_vector_.end() ? NULL : *it;
@ -443,14 +443,14 @@ MockPeerConnectionDependencyFactory::CreatePeerConnection(
const webrtc::MediaConstraintsInterface* constraints,
blink::WebFrame* frame,
webrtc::PeerConnectionObserver* observer) {
return new rtc::RefCountedObject<MockPeerConnectionImpl>(this);
return new talk_base::RefCountedObject<MockPeerConnectionImpl>(this);
}
scoped_refptr<webrtc::AudioSourceInterface>
MockPeerConnectionDependencyFactory::CreateLocalAudioSource(
const webrtc::MediaConstraintsInterface* constraints) {
last_audio_source_ =
new rtc::RefCountedObject<MockAudioSource>(constraints);
new talk_base::RefCountedObject<MockAudioSource>(constraints);
return last_audio_source_;
}
@ -464,7 +464,7 @@ scoped_refptr<webrtc::VideoSourceInterface>
MockPeerConnectionDependencyFactory::CreateVideoSource(
cricket::VideoCapturer* capturer,
const blink::WebMediaConstraints& constraints) {
last_video_source_ = new rtc::RefCountedObject<MockVideoSource>();
last_video_source_ = new talk_base::RefCountedObject<MockVideoSource>();
last_video_source_->SetVideoCapturer(capturer);
return last_video_source_;
}
@ -478,7 +478,7 @@ MockPeerConnectionDependencyFactory::CreateWebAudioSource(
scoped_refptr<webrtc::MediaStreamInterface>
MockPeerConnectionDependencyFactory::CreateLocalMediaStream(
const std::string& label) {
return new rtc::RefCountedObject<MockMediaStream>(label);
return new talk_base::RefCountedObject<MockMediaStream>(label);
}
scoped_refptr<webrtc::VideoTrackInterface>
@ -486,7 +486,7 @@ MockPeerConnectionDependencyFactory::CreateLocalVideoTrack(
const std::string& id,
webrtc::VideoSourceInterface* source) {
scoped_refptr<webrtc::VideoTrackInterface> track(
new rtc::RefCountedObject<MockWebRtcVideoTrack>(
new talk_base::RefCountedObject<MockWebRtcVideoTrack>(
id, source));
return track;
}
@ -496,11 +496,11 @@ MockPeerConnectionDependencyFactory::CreateLocalVideoTrack(
const std::string& id,
cricket::VideoCapturer* capturer) {
scoped_refptr<MockVideoSource> source =
new rtc::RefCountedObject<MockVideoSource>();
new talk_base::RefCountedObject<MockVideoSource>();
source->SetVideoCapturer(capturer);
return
new rtc::RefCountedObject<MockWebRtcVideoTrack>(id, source.get());
new talk_base::RefCountedObject<MockWebRtcVideoTrack>(id, source.get());
}
SessionDescriptionInterface*

@ -145,9 +145,9 @@ class MockMediaStream : public webrtc::MediaStreamInterface {
virtual std::string label() const OVERRIDE;
virtual webrtc::AudioTrackVector GetAudioTracks() OVERRIDE;
virtual webrtc::VideoTrackVector GetVideoTracks() OVERRIDE;
virtual rtc::scoped_refptr<webrtc::AudioTrackInterface>
virtual talk_base::scoped_refptr<webrtc::AudioTrackInterface>
FindAudioTrack(const std::string& track_id) OVERRIDE;
virtual rtc::scoped_refptr<webrtc::VideoTrackInterface>
virtual talk_base::scoped_refptr<webrtc::VideoTrackInterface>
FindVideoTrack(const std::string& track_id) OVERRIDE;
virtual void RegisterObserver(webrtc::ObserverInterface* observer) OVERRIDE;
virtual void UnregisterObserver(webrtc::ObserverInterface* observer) OVERRIDE;

@ -44,7 +44,7 @@
#include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface.h"
#if defined(USE_OPENSSL)
#include "third_party/webrtc/base/ssladapter.h"
#include "third_party/libjingle/source/talk/base/ssladapter.h"
#else
#include "net/socket/nss_ssl_util.h"
#endif
@ -115,8 +115,8 @@ class P2PPortAllocatorFactory : public webrtc::PortAllocatorFactoryInterface {
public:
P2PPortAllocatorFactory(
P2PSocketDispatcher* socket_dispatcher,
rtc::NetworkManager* network_manager,
rtc::PacketSocketFactory* socket_factory,
talk_base::NetworkManager* network_manager,
talk_base::PacketSocketFactory* socket_factory,
blink::WebFrame* web_frame)
: socket_dispatcher_(socket_dispatcher),
network_manager_(network_manager),
@ -163,8 +163,8 @@ class P2PPortAllocatorFactory : public webrtc::PortAllocatorFactoryInterface {
scoped_refptr<P2PSocketDispatcher> socket_dispatcher_;
// |network_manager_| and |socket_factory_| are a weak references, owned by
// PeerConnectionDependencyFactory.
rtc::NetworkManager* network_manager_;
rtc::PacketSocketFactory* socket_factory_;
talk_base::NetworkManager* network_manager_;
talk_base::PacketSocketFactory* socket_factory_;
// Raw ptr to the WebFrame that created the P2PPortAllocatorFactory.
blink::WebFrame* web_frame_;
};
@ -309,7 +309,7 @@ void PeerConnectionDependencyFactory::CreatePeerConnectionFactory() {
// Init SSL, which will be needed by PeerConnection.
#if defined(USE_OPENSSL)
if (!rtc::InitializeSSL()) {
if (!talk_base::InitializeSSL()) {
LOG(ERROR) << "Failed on InitializeSSL.";
NOTREACHED();
return;
@ -385,7 +385,7 @@ PeerConnectionDependencyFactory::CreatePeerConnection(
return NULL;
scoped_refptr<P2PPortAllocatorFactory> pa_factory =
new rtc::RefCountedObject<P2PPortAllocatorFactory>(
new talk_base::RefCountedObject<P2PPortAllocatorFactory>(
p2p_socket_dispatcher_.get(),
network_manager_,
socket_factory_.get(),
@ -549,7 +549,7 @@ PeerConnectionDependencyFactory::GetWebRtcAudioDevice() {
}
void PeerConnectionDependencyFactory::InitializeWorkerThread(
rtc::Thread** thread,
talk_base::Thread** thread,
base::WaitableEvent* event) {
jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
jingle_glue::JingleThreadWrapper::current()->set_send_allowed(true);

@ -22,7 +22,7 @@ namespace base {
class WaitableEvent;
}
namespace rtc {
namespace talk_base {
class NetworkManager;
class PacketSocketFactory;
class Thread;
@ -179,7 +179,7 @@ class CONTENT_EXPORT PeerConnectionDependencyFactory
// creating PeerConnection objects.
void CreatePeerConnectionFactory();
void InitializeWorkerThread(rtc::Thread** thread,
void InitializeWorkerThread(talk_base::Thread** thread,
base::WaitableEvent* event);
void CreateIpcNetworkManagerOnWorkerThread(base::WaitableEvent* event);
@ -206,8 +206,8 @@ class CONTENT_EXPORT PeerConnectionDependencyFactory
// PeerConnection threads. signaling_thread_ is created from the
// "current" chrome thread.
rtc::Thread* signaling_thread_;
rtc::Thread* worker_thread_;
talk_base::Thread* signaling_thread_;
talk_base::Thread* worker_thread_;
base::Thread chrome_worker_thread_;
DISALLOW_COPY_AND_ASSIGN(PeerConnectionDependencyFactory);

@ -18,8 +18,8 @@ scoped_refptr<WebRtcLocalAudioTrackAdapter>
WebRtcLocalAudioTrackAdapter::Create(
const std::string& label,
webrtc::AudioSourceInterface* track_source) {
rtc::RefCountedObject<WebRtcLocalAudioTrackAdapter>* adapter =
new rtc::RefCountedObject<WebRtcLocalAudioTrackAdapter>(
talk_base::RefCountedObject<WebRtcLocalAudioTrackAdapter>* adapter =
new talk_base::RefCountedObject<WebRtcLocalAudioTrackAdapter>(
label, track_source);
return adapter;
}
@ -98,7 +98,7 @@ bool WebRtcLocalAudioTrackAdapter::GetSignalLevel(int* level) {
return true;
}
rtc::scoped_refptr<webrtc::AudioProcessorInterface>
talk_base::scoped_refptr<webrtc::AudioProcessorInterface>
WebRtcLocalAudioTrackAdapter::GetAudioProcessor() {
base::AutoLock auto_lock(lock_);
return audio_processor_.get();

@ -67,7 +67,7 @@ class CONTENT_EXPORT WebRtcLocalAudioTrackAdapter
virtual void AddSink(webrtc::AudioTrackSinkInterface* sink) OVERRIDE;
virtual void RemoveSink(webrtc::AudioTrackSinkInterface* sink) OVERRIDE;
virtual bool GetSignalLevel(int* level) OVERRIDE;
virtual rtc::scoped_refptr<webrtc::AudioProcessorInterface>
virtual talk_base::scoped_refptr<webrtc::AudioProcessorInterface>
GetAudioProcessor() OVERRIDE;
// cricket::AudioCapturer implementation.
@ -83,7 +83,7 @@ class CONTENT_EXPORT WebRtcLocalAudioTrackAdapter
// The source of the audio track which handles the audio constraints.
// TODO(xians): merge |track_source_| to |capturer_| in WebRtcLocalAudioTrack.
rtc::scoped_refptr<webrtc::AudioSourceInterface> track_source_;
talk_base::scoped_refptr<webrtc::AudioSourceInterface> track_source_;
// The audio processsor that applies audio processing on the data of audio
// track.

@ -228,7 +228,7 @@ WebRtcAudioCapturer::WebRtcAudioCapturer(
MediaStreamAudioSource* audio_source)
: constraints_(constraints),
audio_processor_(
new rtc::RefCountedObject<MediaStreamAudioProcessor>(
new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
constraints, device_info.device.input.effects, audio_device)),
running_(false),
render_view_id_(render_view_id),

@ -87,7 +87,7 @@ class WebRtcAudioRendererTest : public testing::Test {
message_loop_->message_loop_proxy())),
factory_(new MockAudioDeviceFactory()),
source_(new MockAudioRendererSource()),
stream_(new rtc::RefCountedObject<MockMediaStream>("label")),
stream_(new talk_base::RefCountedObject<MockMediaStream>("label")),
renderer_(new WebRtcAudioRenderer(stream_, 1, 1, 1, 44100, 441)) {
EXPECT_CALL(*factory_.get(), CreateOutputDevice(1))
.WillOnce(Return(mock_output_device_));

@ -6,7 +6,7 @@
#include "base/time/time.h"
#include "content/public/renderer/webrtc_log_message_delegate.h"
#include "third_party/webrtc/overrides/webrtc/base/logging.h"
#include "third_party/libjingle/overrides/talk/base/logging.h"
namespace content {
@ -22,7 +22,7 @@ void InitWebRtcLoggingDelegate(WebRtcLogMessageDelegate* delegate) {
void InitWebRtcLogging() {
// Log messages from Libjingle should not have timestamps.
rtc::InitDiagnosticLoggingDelegateFunction(&WebRtcLogMessage);
talk_base::InitDiagnosticLoggingDelegateFunction(&WebRtcLogMessage);
}
void WebRtcLogMessage(const std::string& message) {

@ -29,7 +29,7 @@ P2PAsyncAddressResolver::~P2PAsyncAddressResolver() {
DCHECK(!registered_);
}
void P2PAsyncAddressResolver::Start(const rtc::SocketAddress& host_name,
void P2PAsyncAddressResolver::Start(const talk_base::SocketAddress& host_name,
const DoneCallback& done_callback) {
DCHECK(delegate_message_loop_->BelongsToCurrentThread());
DCHECK_EQ(STATE_CREATED, state_);
@ -51,7 +51,7 @@ void P2PAsyncAddressResolver::Cancel() {
}
void P2PAsyncAddressResolver::DoSendRequest(
const rtc::SocketAddress& host_name,
const talk_base::SocketAddress& host_name,
const DoneCallback& done_callback) {
DCHECK(ipc_message_loop_->BelongsToCurrentThread());

@ -11,7 +11,7 @@
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "net/base/net_util.h"
#include "third_party/webrtc/base/asyncresolverinterface.h"
#include "third_party/libjingle/source/talk/base/asyncresolverinterface.h"
namespace base {
class MessageLoop;
@ -31,7 +31,7 @@ class P2PAsyncAddressResolver
P2PAsyncAddressResolver(P2PSocketDispatcher* dispatcher);
// Start address resolve process.
void Start(const rtc::SocketAddress& addr,
void Start(const talk_base::SocketAddress& addr,
const DoneCallback& done_callback);
// Clients must unregister before exiting for cleanup.
void Cancel();
@ -49,7 +49,7 @@ class P2PAsyncAddressResolver
virtual ~P2PAsyncAddressResolver();
void DoSendRequest(const rtc::SocketAddress& host_name,
void DoSendRequest(const talk_base::SocketAddress& host_name,
const DoneCallback& done_callback);
void DoUnregister();
void OnResponse(const net::IPAddressList& address);
@ -65,7 +65,7 @@ class P2PAsyncAddressResolver
// Accessed on the IPC thread only.
int32 request_id_;
bool registered_;
std::vector<rtc::IPAddress> addresses_;
std::vector<talk_base::IPAddress> addresses_;
DoneCallback done_callback_;
DISALLOW_COPY_AND_ASSIGN(P2PAsyncAddressResolver);

@ -15,21 +15,21 @@ namespace content {
namespace {
rtc::AdapterType ConvertConnectionTypeToAdapterType(
talk_base::AdapterType ConvertConnectionTypeToAdapterType(
net::NetworkChangeNotifier::ConnectionType type) {
switch (type) {
case net::NetworkChangeNotifier::CONNECTION_UNKNOWN:
return rtc::ADAPTER_TYPE_UNKNOWN;
return talk_base::ADAPTER_TYPE_UNKNOWN;
case net::NetworkChangeNotifier::CONNECTION_ETHERNET:
return rtc::ADAPTER_TYPE_ETHERNET;
return talk_base::ADAPTER_TYPE_ETHERNET;
case net::NetworkChangeNotifier::CONNECTION_WIFI:
return rtc::ADAPTER_TYPE_WIFI;
return talk_base::ADAPTER_TYPE_WIFI;
case net::NetworkChangeNotifier::CONNECTION_2G:
case net::NetworkChangeNotifier::CONNECTION_3G:
case net::NetworkChangeNotifier::CONNECTION_4G:
return rtc::ADAPTER_TYPE_CELLULAR;
return talk_base::ADAPTER_TYPE_CELLULAR;
default:
return rtc::ADAPTER_TYPE_UNKNOWN;
return talk_base::ADAPTER_TYPE_UNKNOWN;
}
}
@ -73,9 +73,9 @@ void IpcNetworkManager::OnNetworkListChanged(
// Note: 32 and 64 are the arbitrary(kind of) prefix length used to
// differentiate IPv4 and IPv6 addresses.
// rtc::Network uses these prefix_length to compare network
// talk_base::Network uses these prefix_length to compare network
// interfaces discovered.
std::vector<rtc::Network*> networks;
std::vector<talk_base::Network*> networks;
int ipv4_interfaces = 0;
int ipv6_interfaces = 0;
for (net::NetworkInterfaceList::const_iterator it = list.begin();
@ -83,19 +83,19 @@ void IpcNetworkManager::OnNetworkListChanged(
if (it->address.size() == net::kIPv4AddressSize) {
uint32 address;
memcpy(&address, &it->address[0], sizeof(uint32));
address = rtc::NetworkToHost32(address);
rtc::Network* network = new rtc::Network(
it->name, it->name, rtc::IPAddress(address), 32,
address = talk_base::NetworkToHost32(address);
talk_base::Network* network = new talk_base::Network(
it->name, it->name, talk_base::IPAddress(address), 32,
ConvertConnectionTypeToAdapterType(it->type));
network->AddIP(rtc::IPAddress(address));
network->AddIP(talk_base::IPAddress(address));
networks.push_back(network);
++ipv4_interfaces;
} else if (it->address.size() == net::kIPv6AddressSize) {
in6_addr address;
memcpy(&address, &it->address[0], sizeof(in6_addr));
rtc::IPAddress ip6_addr(address);
if (!rtc::IPIsPrivate(ip6_addr)) {
rtc::Network* network = new rtc::Network(
talk_base::IPAddress ip6_addr(address);
if (!talk_base::IPIsPrivate(ip6_addr)) {
talk_base::Network* network = new talk_base::Network(
it->name, it->name, ip6_addr, 64,
ConvertConnectionTypeToAdapterType(it->type));
network->AddIP(ip6_addr);
@ -115,16 +115,16 @@ void IpcNetworkManager::OnNetworkListChanged(
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAllowLoopbackInPeerConnection)) {
std::string name_v4("loopback_ipv4");
rtc::IPAddress ip_address_v4(INADDR_LOOPBACK);
rtc::Network* network_v4 = new rtc::Network(
name_v4, name_v4, ip_address_v4, 32, rtc::ADAPTER_TYPE_UNKNOWN);
talk_base::IPAddress ip_address_v4(INADDR_LOOPBACK);
talk_base::Network* network_v4 = new talk_base::Network(
name_v4, name_v4, ip_address_v4, 32, talk_base::ADAPTER_TYPE_UNKNOWN);
network_v4->AddIP(ip_address_v4);
networks.push_back(network_v4);
std::string name_v6("loopback_ipv6");
rtc::IPAddress ip_address_v6(in6addr_loopback);
rtc::Network* network_v6 = new rtc::Network(
name_v6, name_v6, ip_address_v6, 64, rtc::ADAPTER_TYPE_UNKNOWN);
talk_base::IPAddress ip_address_v6(in6addr_loopback);
talk_base::Network* network_v6 = new talk_base::Network(
name_v6, name_v6, ip_address_v6, 64, talk_base::ADAPTER_TYPE_UNKNOWN);
network_v6->AddIP(ip_address_v6);
networks.push_back(network_v6);
}

@ -12,13 +12,13 @@
#include "content/common/content_export.h"
#include "content/renderer/p2p/network_list_observer.h"
#include "content/renderer/p2p/socket_dispatcher.h"
#include "third_party/webrtc/base/network.h"
#include "third_party/libjingle/source/talk/base/network.h"
namespace content {
// IpcNetworkManager is a NetworkManager for libjingle that gets a
// list of network interfaces from the browser.
class IpcNetworkManager : public rtc::NetworkManagerBase,
class IpcNetworkManager : public talk_base::NetworkManagerBase,
public NetworkListObserver {
public:
// Constructor doesn't take ownership of the |socket_dispatcher|.

@ -19,7 +19,7 @@
#include "content/renderer/p2p/socket_client_impl.h"
#include "content/renderer/p2p/socket_dispatcher.h"
#include "jingle/glue/utils.h"
#include "third_party/webrtc/base/asyncpacketsocket.h"
#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
namespace content {
@ -36,22 +36,22 @@ bool IsTcpClientSocket(P2PSocketType type) {
(type == P2P_SOCKET_STUN_TLS_CLIENT);
}
bool JingleSocketOptionToP2PSocketOption(rtc::Socket::Option option,
bool JingleSocketOptionToP2PSocketOption(talk_base::Socket::Option option,
P2PSocketOption* ipc_option) {
switch (option) {
case rtc::Socket::OPT_RCVBUF:
case talk_base::Socket::OPT_RCVBUF:
*ipc_option = P2P_SOCKET_OPT_RCVBUF;
break;
case rtc::Socket::OPT_SNDBUF:
case talk_base::Socket::OPT_SNDBUF:
*ipc_option = P2P_SOCKET_OPT_SNDBUF;
break;
case rtc::Socket::OPT_DSCP:
case talk_base::Socket::OPT_DSCP:
*ipc_option = P2P_SOCKET_OPT_DSCP;
break;
case rtc::Socket::OPT_DONTFRAGMENT:
case rtc::Socket::OPT_NODELAY:
case rtc::Socket::OPT_IPV6_V6ONLY:
case rtc::Socket::OPT_RTP_SENDTIME_EXTN_ID:
case talk_base::Socket::OPT_DONTFRAGMENT:
case talk_base::Socket::OPT_NODELAY:
case talk_base::Socket::OPT_IPV6_V6ONLY:
case talk_base::Socket::OPT_RTP_SENDTIME_EXTN_ID:
return false; // Not supported by the chrome sockets.
default:
NOTREACHED();
@ -63,10 +63,10 @@ bool JingleSocketOptionToP2PSocketOption(rtc::Socket::Option option,
// TODO(miu): This needs tuning. http://crbug.com/237960
const size_t kMaximumInFlightBytes = 64 * 1024; // 64 KB
// IpcPacketSocket implements rtc::AsyncPacketSocket interface
// IpcPacketSocket implements talk_base::AsyncPacketSocket interface
// using P2PSocketClient that works over IPC-channel. It must be used
// on the thread it was created.
class IpcPacketSocket : public rtc::AsyncPacketSocket,
class IpcPacketSocket : public talk_base::AsyncPacketSocket,
public P2PSocketClientDelegate {
public:
IpcPacketSocket();
@ -74,21 +74,21 @@ class IpcPacketSocket : public rtc::AsyncPacketSocket,
// Always takes ownership of client even if initialization fails.
bool Init(P2PSocketType type, P2PSocketClientImpl* client,
const rtc::SocketAddress& local_address,
const rtc::SocketAddress& remote_address);
const talk_base::SocketAddress& local_address,
const talk_base::SocketAddress& remote_address);
// rtc::AsyncPacketSocket interface.
virtual rtc::SocketAddress GetLocalAddress() const OVERRIDE;
virtual rtc::SocketAddress GetRemoteAddress() const OVERRIDE;
// talk_base::AsyncPacketSocket interface.
virtual talk_base::SocketAddress GetLocalAddress() const OVERRIDE;
virtual talk_base::SocketAddress GetRemoteAddress() const OVERRIDE;
virtual int Send(const void *pv, size_t cb,
const rtc::PacketOptions& options) OVERRIDE;
const talk_base::PacketOptions& options) OVERRIDE;
virtual int SendTo(const void *pv, size_t cb,
const rtc::SocketAddress& addr,
const rtc::PacketOptions& options) OVERRIDE;
const talk_base::SocketAddress& addr,
const talk_base::PacketOptions& options) OVERRIDE;
virtual int Close() OVERRIDE;
virtual State GetState() const OVERRIDE;
virtual int GetOption(rtc::Socket::Option option, int* value) OVERRIDE;
virtual int SetOption(rtc::Socket::Option option, int value) OVERRIDE;
virtual int GetOption(talk_base::Socket::Option option, int* value) OVERRIDE;
virtual int SetOption(talk_base::Socket::Option option, int value) OVERRIDE;
virtual int GetError() const OVERRIDE;
virtual void SetError(int error) OVERRIDE;
@ -119,8 +119,8 @@ class IpcPacketSocket : public rtc::AsyncPacketSocket,
void TraceSendThrottlingState() const;
void InitAcceptedTcp(P2PSocketClient* client,
const rtc::SocketAddress& local_address,
const rtc::SocketAddress& remote_address);
const talk_base::SocketAddress& local_address,
const talk_base::SocketAddress& remote_address);
int DoSetOption(P2PSocketOption option, int value);
@ -135,10 +135,10 @@ class IpcPacketSocket : public rtc::AsyncPacketSocket,
// Local address is allocated by the browser process, and the
// renderer side doesn't know the address until it receives OnOpen()
// event from the browser.
rtc::SocketAddress local_address_;
talk_base::SocketAddress local_address_;
// Remote address for client TCP connections.
rtc::SocketAddress remote_address_;
talk_base::SocketAddress remote_address_;
// Current state of the object.
InternalState state_;
@ -169,15 +169,15 @@ class IpcPacketSocket : public rtc::AsyncPacketSocket,
// of MT sig slots clients must call disconnect. This class is to make sure
// we destruct from the same thread on which is created.
class AsyncAddressResolverImpl : public base::NonThreadSafe,
public rtc::AsyncResolverInterface {
public talk_base::AsyncResolverInterface {
public:
AsyncAddressResolverImpl(P2PSocketDispatcher* dispatcher);
virtual ~AsyncAddressResolverImpl();
// rtc::AsyncResolverInterface interface.
virtual void Start(const rtc::SocketAddress& addr) OVERRIDE;
// talk_base::AsyncResolverInterface interface.
virtual void Start(const talk_base::SocketAddress& addr) OVERRIDE;
virtual bool GetResolvedAddress(
int family, rtc::SocketAddress* addr) const OVERRIDE;
int family, talk_base::SocketAddress* addr) const OVERRIDE;
virtual int GetError() const OVERRIDE;
virtual void Destroy(bool wait) OVERRIDE;
@ -186,7 +186,7 @@ class AsyncAddressResolverImpl : public base::NonThreadSafe,
scoped_refptr<P2PAsyncAddressResolver> resolver_;
int port_; // Port number in |addr| from Start() method.
std::vector<rtc::IPAddress> addresses_; // Resolved addresses.
std::vector<talk_base::IPAddress> addresses_; // Resolved addresses.
};
IpcPacketSocket::IpcPacketSocket()
@ -217,8 +217,8 @@ void IpcPacketSocket::TraceSendThrottlingState() const {
bool IpcPacketSocket::Init(P2PSocketType type,
P2PSocketClientImpl* client,
const rtc::SocketAddress& local_address,
const rtc::SocketAddress& remote_address) {
const talk_base::SocketAddress& local_address,
const talk_base::SocketAddress& remote_address) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
DCHECK_EQ(state_, IS_UNINITIALIZED);
@ -255,8 +255,8 @@ bool IpcPacketSocket::Init(P2PSocketType type,
void IpcPacketSocket::InitAcceptedTcp(
P2PSocketClient* client,
const rtc::SocketAddress& local_address,
const rtc::SocketAddress& remote_address) {
const talk_base::SocketAddress& local_address,
const talk_base::SocketAddress& remote_address) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
DCHECK_EQ(state_, IS_UNINITIALIZED);
@ -268,26 +268,26 @@ void IpcPacketSocket::InitAcceptedTcp(
client_->SetDelegate(this);
}
// rtc::AsyncPacketSocket interface.
rtc::SocketAddress IpcPacketSocket::GetLocalAddress() const {
// talk_base::AsyncPacketSocket interface.
talk_base::SocketAddress IpcPacketSocket::GetLocalAddress() const {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
return local_address_;
}
rtc::SocketAddress IpcPacketSocket::GetRemoteAddress() const {
talk_base::SocketAddress IpcPacketSocket::GetRemoteAddress() const {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
return remote_address_;
}
int IpcPacketSocket::Send(const void *data, size_t data_size,
const rtc::PacketOptions& options) {
const talk_base::PacketOptions& options) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
return SendTo(data, data_size, remote_address_, options);
}
int IpcPacketSocket::SendTo(const void *data, size_t data_size,
const rtc::SocketAddress& address,
const rtc::PacketOptions& options) {
const talk_base::SocketAddress& address,
const talk_base::PacketOptions& options) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
switch (state_) {
@ -355,7 +355,7 @@ int IpcPacketSocket::Close() {
return 0;
}
rtc::AsyncPacketSocket::State IpcPacketSocket::GetState() const {
talk_base::AsyncPacketSocket::State IpcPacketSocket::GetState() const {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
switch (state_) {
@ -382,7 +382,7 @@ rtc::AsyncPacketSocket::State IpcPacketSocket::GetState() const {
return STATE_CLOSED;
}
int IpcPacketSocket::GetOption(rtc::Socket::Option option, int* value) {
int IpcPacketSocket::GetOption(talk_base::Socket::Option option, int* value) {
P2PSocketOption p2p_socket_option = P2P_SOCKET_OPT_MAX;
if (!JingleSocketOptionToP2PSocketOption(option, &p2p_socket_option)) {
// unsupported option.
@ -393,7 +393,7 @@ int IpcPacketSocket::GetOption(rtc::Socket::Option option, int* value) {
return 0;
}
int IpcPacketSocket::SetOption(rtc::Socket::Option option, int value) {
int IpcPacketSocket::SetOption(talk_base::Socket::Option option, int value) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
P2PSocketOption p2p_socket_option = P2P_SOCKET_OPT_MAX;
@ -456,7 +456,7 @@ void IpcPacketSocket::OnOpen(const net::IPEndPoint& local_address,
// in the callback. This address will be used while sending the packets
// over the network.
if (remote_address_.IsUnresolvedIP()) {
rtc::SocketAddress jingle_socket_address;
talk_base::SocketAddress jingle_socket_address;
if (!jingle_glue::IPEndPointToSocketAddress(
remote_address, &jingle_socket_address)) {
NOTREACHED();
@ -474,7 +474,7 @@ void IpcPacketSocket::OnIncomingTcpConnection(
scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
rtc::SocketAddress remote_address;
talk_base::SocketAddress remote_address;
if (!jingle_glue::IPEndPointToSocketAddress(address, &remote_address)) {
// Always expect correct IPv4 address to be allocated.
NOTREACHED();
@ -519,7 +519,7 @@ void IpcPacketSocket::OnDataReceived(const net::IPEndPoint& address,
const base::TimeTicks& timestamp) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
rtc::SocketAddress address_lj;
talk_base::SocketAddress address_lj;
if (!jingle_glue::IPEndPointToSocketAddress(address, &address_lj)) {
// We should always be able to convert address here because we
// don't expect IPv6 address on IPv4 connections.
@ -527,7 +527,7 @@ void IpcPacketSocket::OnDataReceived(const net::IPEndPoint& address,
return;
}
rtc::PacketTime packet_time(timestamp.ToInternalValue(), 0);
talk_base::PacketTime packet_time(timestamp.ToInternalValue(), 0);
SignalReadPacket(this, &data[0], data.size(), address_lj,
packet_time);
}
@ -540,7 +540,7 @@ AsyncAddressResolverImpl::AsyncAddressResolverImpl(
AsyncAddressResolverImpl::~AsyncAddressResolverImpl() {
}
void AsyncAddressResolverImpl::Start(const rtc::SocketAddress& addr) {
void AsyncAddressResolverImpl::Start(const talk_base::SocketAddress& addr) {
DCHECK(CalledOnValidThread());
// Copy port number from |addr|. |port_| must be copied
// when resolved address is returned in GetResolvedAddress.
@ -552,7 +552,7 @@ void AsyncAddressResolverImpl::Start(const rtc::SocketAddress& addr) {
}
bool AsyncAddressResolverImpl::GetResolvedAddress(
int family, rtc::SocketAddress* addr) const {
int family, talk_base::SocketAddress* addr) const {
DCHECK(CalledOnValidThread());
if (addresses_.empty())
@ -585,7 +585,7 @@ void AsyncAddressResolverImpl::OnAddressResolved(
const net::IPAddressList& addresses) {
DCHECK(CalledOnValidThread());
for (size_t i = 0; i < addresses.size(); ++i) {
rtc::SocketAddress socket_address;
talk_base::SocketAddress socket_address;
if (!jingle_glue::IPEndPointToSocketAddress(
net::IPEndPoint(addresses[i], 0), &socket_address)) {
NOTREACHED();
@ -605,54 +605,54 @@ IpcPacketSocketFactory::IpcPacketSocketFactory(
IpcPacketSocketFactory::~IpcPacketSocketFactory() {
}
rtc::AsyncPacketSocket* IpcPacketSocketFactory::CreateUdpSocket(
const rtc::SocketAddress& local_address, int min_port, int max_port) {
rtc::SocketAddress crome_address;
talk_base::AsyncPacketSocket* IpcPacketSocketFactory::CreateUdpSocket(
const talk_base::SocketAddress& local_address, int min_port, int max_port) {
talk_base::SocketAddress crome_address;
P2PSocketClientImpl* socket_client =
new P2PSocketClientImpl(socket_dispatcher_);
scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
// TODO(sergeyu): Respect local_address and port limits here (need
// to pass them over IPC channel to the browser).
if (!socket->Init(P2P_SOCKET_UDP, socket_client,
local_address, rtc::SocketAddress())) {
local_address, talk_base::SocketAddress())) {
return NULL;
}
return socket.release();
}
rtc::AsyncPacketSocket* IpcPacketSocketFactory::CreateServerTcpSocket(
const rtc::SocketAddress& local_address, int min_port, int max_port,
talk_base::AsyncPacketSocket* IpcPacketSocketFactory::CreateServerTcpSocket(
const talk_base::SocketAddress& local_address, int min_port, int max_port,
int opts) {
// TODO(sergeyu): Implement SSL support.
if (opts & rtc::PacketSocketFactory::OPT_SSLTCP)
if (opts & talk_base::PacketSocketFactory::OPT_SSLTCP)
return NULL;
P2PSocketType type = (opts & rtc::PacketSocketFactory::OPT_STUN) ?
P2PSocketType type = (opts & talk_base::PacketSocketFactory::OPT_STUN) ?
P2P_SOCKET_STUN_TCP_SERVER : P2P_SOCKET_TCP_SERVER;
P2PSocketClientImpl* socket_client =
new P2PSocketClientImpl(socket_dispatcher_);
scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
if (!socket->Init(type, socket_client, local_address,
rtc::SocketAddress())) {
talk_base::SocketAddress())) {
return NULL;
}
return socket.release();
}
rtc::AsyncPacketSocket* IpcPacketSocketFactory::CreateClientTcpSocket(
const rtc::SocketAddress& local_address,
const rtc::SocketAddress& remote_address,
const rtc::ProxyInfo& proxy_info,
talk_base::AsyncPacketSocket* IpcPacketSocketFactory::CreateClientTcpSocket(
const talk_base::SocketAddress& local_address,
const talk_base::SocketAddress& remote_address,
const talk_base::ProxyInfo& proxy_info,
const std::string& user_agent, int opts) {
P2PSocketType type;
if (opts & rtc::PacketSocketFactory::OPT_SSLTCP) {
type = (opts & rtc::PacketSocketFactory::OPT_STUN) ?
if (opts & talk_base::PacketSocketFactory::OPT_SSLTCP) {
type = (opts & talk_base::PacketSocketFactory::OPT_STUN) ?
P2P_SOCKET_STUN_SSLTCP_CLIENT : P2P_SOCKET_SSLTCP_CLIENT;
} else if (opts & rtc::PacketSocketFactory::OPT_TLS) {
type = (opts & rtc::PacketSocketFactory::OPT_STUN) ?
} else if (opts & talk_base::PacketSocketFactory::OPT_TLS) {
type = (opts & talk_base::PacketSocketFactory::OPT_STUN) ?
P2P_SOCKET_STUN_TLS_CLIENT : P2P_SOCKET_TLS_CLIENT;
} else {
type = (opts & rtc::PacketSocketFactory::OPT_STUN) ?
type = (opts & talk_base::PacketSocketFactory::OPT_STUN) ?
P2P_SOCKET_STUN_TCP_CLIENT : P2P_SOCKET_TCP_CLIENT;
}
P2PSocketClientImpl* socket_client =
@ -663,7 +663,7 @@ rtc::AsyncPacketSocket* IpcPacketSocketFactory::CreateClientTcpSocket(
return socket.release();
}
rtc::AsyncResolverInterface*
talk_base::AsyncResolverInterface*
IpcPacketSocketFactory::CreateAsyncResolver() {
scoped_ptr<AsyncAddressResolverImpl> resolver(
new AsyncAddressResolverImpl(socket_dispatcher_));

@ -14,33 +14,33 @@ namespace content {
class P2PSocketDispatcher;
// IpcPacketSocketFactory implements rtc::PacketSocketFactory
// IpcPacketSocketFactory implements talk_base::PacketSocketFactory
// interface for libjingle using IPC-based P2P sockets. The class must
// be used on a thread that is a libjingle thread (implements
// rtc::Thread) and also has associated base::MessageLoop. Each
// talk_base::Thread) and also has associated base::MessageLoop. Each
// socket created by the factory must be used on the thread it was
// created on.
class IpcPacketSocketFactory : public rtc::PacketSocketFactory {
class IpcPacketSocketFactory : public talk_base::PacketSocketFactory {
public:
CONTENT_EXPORT explicit IpcPacketSocketFactory(
P2PSocketDispatcher* socket_dispatcher);
virtual ~IpcPacketSocketFactory();
virtual rtc::AsyncPacketSocket* CreateUdpSocket(
const rtc::SocketAddress& local_address,
virtual talk_base::AsyncPacketSocket* CreateUdpSocket(
const talk_base::SocketAddress& local_address,
int min_port, int max_port) OVERRIDE;
virtual rtc::AsyncPacketSocket* CreateServerTcpSocket(
const rtc::SocketAddress& local_address,
virtual talk_base::AsyncPacketSocket* CreateServerTcpSocket(
const talk_base::SocketAddress& local_address,
int min_port,
int max_port,
int opts) OVERRIDE;
virtual rtc::AsyncPacketSocket* CreateClientTcpSocket(
const rtc::SocketAddress& local_address,
const rtc::SocketAddress& remote_address,
const rtc::ProxyInfo& proxy_info,
virtual talk_base::AsyncPacketSocket* CreateClientTcpSocket(
const talk_base::SocketAddress& local_address,
const talk_base::SocketAddress& remote_address,
const talk_base::ProxyInfo& proxy_info,
const std::string& user_agent,
int opts) OVERRIDE;
virtual rtc::AsyncResolverInterface* CreateAsyncResolver() OVERRIDE;
virtual talk_base::AsyncResolverInterface* CreateAsyncResolver() OVERRIDE;
private:
P2PSocketDispatcher* socket_dispatcher_;

@ -69,8 +69,8 @@ P2PPortAllocator::Config::RelayServerConfig::~RelayServerConfig() {
P2PPortAllocator::P2PPortAllocator(
blink::WebFrame* web_frame,
P2PSocketDispatcher* socket_dispatcher,
rtc::NetworkManager* network_manager,
rtc::PacketSocketFactory* socket_factory,
talk_base::NetworkManager* network_manager,
talk_base::PacketSocketFactory* socket_factory,
const Config& config)
: cricket::BasicPortAllocator(network_manager, socket_factory),
web_frame_(web_frame),
@ -259,7 +259,7 @@ void P2PPortAllocatorSession::ParseRelayResponse() {
void P2PPortAllocatorSession::AddConfig() {
const P2PPortAllocator::Config& config = allocator_->config_;
cricket::PortConfiguration* port_config = new cricket::PortConfiguration(
rtc::SocketAddress(config.stun_server, config.stun_server_port),
talk_base::SocketAddress(config.stun_server, config.stun_server_port),
std::string(), std::string());
for (size_t i = 0; i < config.relays.size(); ++i) {
@ -278,7 +278,7 @@ void P2PPortAllocatorSession::AddConfig() {
}
relay_server.ports.push_back(cricket::ProtocolAddress(
rtc::SocketAddress(config.relays[i].server_address,
talk_base::SocketAddress(config.relays[i].server_address,
config.relays[i].port),
protocol,
config.relays[i].secure));

@ -56,8 +56,8 @@ class P2PPortAllocator : public cricket::BasicPortAllocator {
P2PPortAllocator(blink::WebFrame* web_frame,
P2PSocketDispatcher* socket_dispatcher,
rtc::NetworkManager* network_manager,
rtc::PacketSocketFactory* socket_factory,
talk_base::NetworkManager* network_manager,
talk_base::PacketSocketFactory* socket_factory,
const Config& config);
virtual ~P2PPortAllocator();
@ -115,7 +115,7 @@ class P2PPortAllocatorSession : public cricket::BasicPortAllocatorSession,
scoped_ptr<blink::WebURLLoader> relay_session_request_;
int relay_session_attempts_;
std::string relay_session_response_;
rtc::SocketAddress relay_ip_;
talk_base::SocketAddress relay_ip_;
int relay_udp_port_;
int relay_tcp_port_;
int relay_ssltcp_port_;

@ -11,7 +11,7 @@
#include "content/common/p2p_socket_type.h"
#include "net/base/ip_endpoint.h"
namespace rtc {
namespace talk_base {
struct PacketOptions;
};
@ -44,7 +44,7 @@ class P2PSocketClient : public base::RefCountedThreadSafe<P2PSocketClient> {
// |dscp|.
virtual void SendWithDscp(const net::IPEndPoint& address,
const std::vector<char>& data,
const rtc::PacketOptions& options) = 0;
const talk_base::PacketOptions& options) = 0;
virtual void SetOption(P2PSocketOption option, int value) = 0;

@ -72,7 +72,7 @@ void P2PSocketClientImpl::DoInit(P2PSocketType type,
void P2PSocketClientImpl::SendWithDscp(
const net::IPEndPoint& address,
const std::vector<char>& data,
const rtc::PacketOptions& options) {
const talk_base::PacketOptions& options) {
if (!ipc_message_loop_->BelongsToCurrentThread()) {
ipc_message_loop_->PostTask(
FROM_HERE, base::Bind(
@ -92,7 +92,7 @@ void P2PSocketClientImpl::SendWithDscp(
void P2PSocketClientImpl::Send(const net::IPEndPoint& address,
const std::vector<char>& data) {
rtc::PacketOptions options(rtc::DSCP_DEFAULT);
talk_base::PacketOptions options(talk_base::DSCP_DEFAULT);
SendWithDscp(address, data, options);
}

@ -47,7 +47,7 @@ class P2PSocketClientImpl : public P2PSocketClient {
// |dscp|.
virtual void SendWithDscp(const net::IPEndPoint& address,
const std::vector<char>& data,
const rtc::PacketOptions& options) OVERRIDE;
const talk_base::PacketOptions& options) OVERRIDE;
// Setting socket options.
virtual void SetOption(P2PSocketOption option, int value) OVERRIDE;

@ -20,7 +20,7 @@
#include "ppapi/shared_impl/media_stream_buffer.h"
// IS_ALIGNED is also defined in
// third_party/webrtc/overrides/webrtc/base/basictypes.h
// third_party/libjingle/overrides/talk/base/basictypes.h
// TODO(ronghuawu): Avoid undef.
#undef IS_ALIGNED
#include "third_party/libyuv/include/libyuv.h"

@ -1,5 +1,4 @@
# Needed by logging_unittest.cc since it tests the overrides.
include_rules = [
"+third_party/libjingle/overrides",
"+third_party/webrtc",
]

@ -76,7 +76,7 @@ int TransportChannelSocketAdapter::Write(
}
int result;
rtc::PacketOptions options;
talk_base::PacketOptions options;
if (channel_->writable()) {
result = channel_->SendPacket(buffer->data(), buffer_size, options);
if (result < 0) {
@ -101,13 +101,13 @@ int TransportChannelSocketAdapter::Write(
int TransportChannelSocketAdapter::SetReceiveBufferSize(int32 size) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
return (channel_->SetOption(rtc::Socket::OPT_RCVBUF, size) == 0) ?
return (channel_->SetOption(talk_base::Socket::OPT_RCVBUF, size) == 0) ?
net::OK : net::ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR;
}
int TransportChannelSocketAdapter::SetSendBufferSize(int32 size) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
return (channel_->SetOption(rtc::Socket::OPT_SNDBUF, size) == 0) ?
return (channel_->SetOption(talk_base::Socket::OPT_SNDBUF, size) == 0) ?
net::OK : net::ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR;
}
@ -142,7 +142,7 @@ void TransportChannelSocketAdapter::OnNewPacket(
cricket::TransportChannel* channel,
const char* data,
size_t data_size,
const rtc::PacketTime& packet_time,
const talk_base::PacketTime& packet_time,
int flags) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
DCHECK_EQ(channel, channel_);
@ -174,7 +174,7 @@ void TransportChannelSocketAdapter::OnWritableState(
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
// Try to send the packet if there is a pending write.
if (!write_callback_.is_null()) {
rtc::PacketOptions options;
talk_base::PacketOptions options;
int result = channel_->SendPacket(write_buffer_->data(),
write_buffer_size_,
options);

@ -8,9 +8,9 @@
#include "base/callback_forward.h"
#include "base/compiler_specific.h"
#include "net/socket/socket.h"
#include "third_party/webrtc/base/asyncpacketsocket.h"
#include "third_party/webrtc/base/sigslot.h"
#include "third_party/webrtc/base/socketaddress.h"
#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
#include "third_party/libjingle/source/talk/base/socketaddress.h"
#include "third_party/libjingle/source/talk/base/sigslot.h"
namespace base {
class MessageLoop;
@ -55,7 +55,7 @@ class TransportChannelSocketAdapter : public net::Socket,
void OnNewPacket(cricket::TransportChannel* channel,
const char* data,
size_t data_size,
const rtc::PacketTime& packet_time,
const talk_base::PacketTime& packet_time,
int flags);
void OnWritableState(cricket::TransportChannel* channel);
void OnChannelDestroyed(cricket::TransportChannel* channel);

@ -36,19 +36,19 @@ class MockTransportChannel : public cricket::TransportChannel {
MOCK_METHOD4(SendPacket, int(const char* data,
size_t len,
const rtc::PacketOptions& options,
const talk_base::PacketOptions& options,
int flags));
MOCK_METHOD2(SetOption, int(rtc::Socket::Option opt, int value));
MOCK_METHOD2(SetOption, int(talk_base::Socket::Option opt, int value));
MOCK_METHOD0(GetError, int());
MOCK_CONST_METHOD0(GetIceRole, cricket::IceRole());
MOCK_METHOD1(GetStats, bool(cricket::ConnectionInfos* infos));
MOCK_CONST_METHOD0(IsDtlsActive, bool());
MOCK_CONST_METHOD1(GetSslRole, bool(rtc::SSLRole* role));
MOCK_CONST_METHOD1(GetSslRole, bool(talk_base::SSLRole* role));
MOCK_METHOD1(SetSrtpCiphers, bool(const std::vector<std::string>& ciphers));
MOCK_METHOD1(GetSrtpCipher, bool(std::string* cipher));
MOCK_CONST_METHOD1(GetLocalIdentity, bool(rtc::SSLIdentity** identity));
MOCK_CONST_METHOD1(GetLocalIdentity, bool(talk_base::SSLIdentity** identity));
MOCK_CONST_METHOD1(GetRemoteCertificate,
bool(rtc::SSLCertificate** cert));
bool(talk_base::SSLCertificate** cert));
MOCK_METHOD6(ExportKeyingMaterial, bool(const std::string& label,
const uint8* context,
size_t context_len,
@ -89,7 +89,7 @@ TEST_F(TransportChannelSocketAdapterTest, Read) {
ASSERT_EQ(net::ERR_IO_PENDING, result);
channel_.SignalReadPacket(&channel_, kTestData, kTestDataSize,
rtc::CreatePacketTime(0), 0);
talk_base::CreatePacketTime(0), 0);
EXPECT_EQ(kTestDataSize, callback_result_);
}

@ -22,7 +22,7 @@
#include "net/socket/ssl_client_socket.h"
#include "net/socket/tcp_client_socket.h"
#include "net/ssl/ssl_config_service.h"
#include "third_party/webrtc/base/socketaddress.h"
#include "third_party/libjingle/source/talk/base/socketaddress.h"
namespace jingle_glue {
@ -84,7 +84,7 @@ void ChromeAsyncSocket::DoNetErrorFromStatus(int status) {
// STATE_CLOSED -> STATE_CONNECTING
bool ChromeAsyncSocket::Connect(const rtc::SocketAddress& address) {
bool ChromeAsyncSocket::Connect(const talk_base::SocketAddress& address) {
if (state_ != STATE_CLOSED) {
LOG(DFATAL) << "Connect() called on non-closed socket";
DoNonNetError(ERROR_WRONGSTATE);

@ -72,7 +72,7 @@ class ChromeAsyncSocket : public buzz::AsyncSocket {
// Otherwise, starts the connection process and returns true.
// SignalConnected will be raised when the connection is successful;
// otherwise, SignalClosed will be raised with a net error set.
virtual bool Connect(const rtc::SocketAddress& address) OVERRIDE;
virtual bool Connect(const talk_base::SocketAddress& address) OVERRIDE;
// Tries to read at most |len| bytes into |data|.
//

@ -23,9 +23,9 @@
#include "net/ssl/ssl_config_service.h"
#include "net/url_request/url_request_context_getter.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/base/ipaddress.h"
#include "third_party/webrtc/base/sigslot.h"
#include "third_party/webrtc/base/socketaddress.h"
#include "third_party/libjingle/source/talk/base/ipaddress.h"
#include "third_party/libjingle/source/talk/base/sigslot.h"
#include "third_party/libjingle/source/talk/base/socketaddress.h"
namespace jingle_glue {
@ -431,7 +431,7 @@ class ChromeAsyncSocketTest
scoped_ptr<ChromeAsyncSocket> chrome_async_socket_;
std::deque<SignalSocketState> signal_socket_states_;
const rtc::SocketAddress addr_;
const talk_base::SocketAddress addr_;
private:
DISALLOW_COPY_AND_ASSIGN(ChromeAsyncSocketTest);
@ -473,9 +473,9 @@ TEST_F(ChromeAsyncSocketTest, DoubleClose) {
}
TEST_F(ChromeAsyncSocketTest, NoHostnameConnect) {
rtc::IPAddress ip_address;
EXPECT_TRUE(rtc::IPFromString("127.0.0.1", &ip_address));
const rtc::SocketAddress no_hostname_addr(ip_address, addr_.port());
talk_base::IPAddress ip_address;
EXPECT_TRUE(talk_base::IPFromString("127.0.0.1", &ip_address));
const talk_base::SocketAddress no_hostname_addr(ip_address, addr_.port());
EXPECT_FALSE(chrome_async_socket_->Connect(no_hostname_addr));
ExpectErrorState(ChromeAsyncSocket::STATE_CLOSED,
ChromeAsyncSocket::ERROR_DNS);
@ -485,7 +485,7 @@ TEST_F(ChromeAsyncSocketTest, NoHostnameConnect) {
}
TEST_F(ChromeAsyncSocketTest, ZeroPortConnect) {
const rtc::SocketAddress zero_port_addr(addr_.hostname(), 0);
const talk_base::SocketAddress zero_port_addr(addr_.hostname(), 0);
EXPECT_FALSE(chrome_async_socket_->Connect(zero_port_addr));
ExpectErrorState(ChromeAsyncSocket::STATE_CLOSED,
ChromeAsyncSocket::ERROR_DNS);

@ -6,24 +6,24 @@
#define JINGLE_GLUE_JINGLE_GLUE_MOCK_OBJECTS_H_
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/webrtc/base/stream.h"
#include "third_party/libjingle/source/talk/base/stream.h"
namespace jingle_glue {
class MockStream : public rtc::StreamInterface {
class MockStream : public talk_base::StreamInterface {
public:
MockStream();
virtual ~MockStream();
MOCK_CONST_METHOD0(GetState, rtc::StreamState());
MOCK_CONST_METHOD0(GetState, talk_base::StreamState());
MOCK_METHOD4(Read, rtc::StreamResult(void*, size_t, size_t*, int*));
MOCK_METHOD4(Write, rtc::StreamResult(const void*, size_t,
MOCK_METHOD4(Read, talk_base::StreamResult(void*, size_t, size_t*, int*));
MOCK_METHOD4(Write, talk_base::StreamResult(const void*, size_t,
size_t*, int*));
MOCK_CONST_METHOD1(GetAvailable, bool(size_t*));
MOCK_METHOD0(Close, void());
MOCK_METHOD3(PostEvent, void(rtc::Thread*, int, int));
MOCK_METHOD3(PostEvent, void(talk_base::Thread*, int, int));
MOCK_METHOD2(PostEvent, void(int, int));
};

@ -9,9 +9,9 @@
// The following include must be first in this file. It ensures that
// libjingle style logging is used.
#define LOGGING_INSIDE_WEBRTC
#define LOGGING_INSIDE_LIBJINGLE
#include "third_party/webrtc/overrides/webrtc/base/logging.h"
#include "third_party/libjingle/overrides/talk/base/logging.h"
#include "base/command_line.h"
#include "base/file_util.h"
@ -25,17 +25,17 @@ static const char* const log_file_name = "libjingle_logging.log";
static const int kDefaultVerbosity = 0;
static const char* AsString(rtc::LoggingSeverity severity) {
static const char* AsString(talk_base::LoggingSeverity severity) {
switch (severity) {
case rtc::LS_ERROR:
case talk_base::LS_ERROR:
return "LS_ERROR";
case rtc::LS_WARNING:
case talk_base::LS_WARNING:
return "LS_WARNING";
case rtc::LS_INFO:
case talk_base::LS_INFO:
return "LS_INFO";
case rtc::LS_VERBOSE:
case talk_base::LS_VERBOSE:
return "LS_VERBOSE";
case rtc::LS_SENSITIVE:
case talk_base::LS_SENSITIVE:
return "LS_SENSITIVE";
default:
return "";
@ -75,11 +75,11 @@ TEST(LibjingleLogTest, DefaultConfiguration) {
ASSERT_TRUE(Initialize(kDefaultVerbosity));
// In the default configuration nothing should be logged.
LOG_V(rtc::LS_ERROR) << AsString(rtc::LS_ERROR);
LOG_V(rtc::LS_WARNING) << AsString(rtc::LS_WARNING);
LOG_V(rtc::LS_INFO) << AsString(rtc::LS_INFO);
LOG_V(rtc::LS_VERBOSE) << AsString(rtc::LS_VERBOSE);
LOG_V(rtc::LS_SENSITIVE) << AsString(rtc::LS_SENSITIVE);
LOG_V(talk_base::LS_ERROR) << AsString(talk_base::LS_ERROR);
LOG_V(talk_base::LS_WARNING) << AsString(talk_base::LS_WARNING);
LOG_V(talk_base::LS_INFO) << AsString(talk_base::LS_INFO);
LOG_V(talk_base::LS_VERBOSE) << AsString(talk_base::LS_VERBOSE);
LOG_V(talk_base::LS_SENSITIVE) << AsString(talk_base::LS_SENSITIVE);
// Read file to string.
base::FilePath file_path(log_file_name);
@ -87,26 +87,26 @@ TEST(LibjingleLogTest, DefaultConfiguration) {
base::ReadFileToString(file_path, &contents_of_file);
// Make sure string contains the expected values.
EXPECT_FALSE(ContainsString(contents_of_file, AsString(rtc::LS_ERROR)));
EXPECT_FALSE(ContainsString(contents_of_file, AsString(talk_base::LS_ERROR)));
EXPECT_FALSE(ContainsString(contents_of_file,
AsString(rtc::LS_WARNING)));
EXPECT_FALSE(ContainsString(contents_of_file, AsString(rtc::LS_INFO)));
AsString(talk_base::LS_WARNING)));
EXPECT_FALSE(ContainsString(contents_of_file, AsString(talk_base::LS_INFO)));
EXPECT_FALSE(ContainsString(contents_of_file,
AsString(rtc::LS_VERBOSE)));
AsString(talk_base::LS_VERBOSE)));
EXPECT_FALSE(ContainsString(contents_of_file,
AsString(rtc::LS_SENSITIVE)));
AsString(talk_base::LS_SENSITIVE)));
}
TEST(LibjingleLogTest, InfoConfiguration) {
ASSERT_TRUE(Initialize(rtc::LS_INFO));
ASSERT_TRUE(Initialize(talk_base::LS_INFO));
// In this configuration everything lower or equal to LS_INFO should be
// logged.
LOG_V(rtc::LS_ERROR) << AsString(rtc::LS_ERROR);
LOG_V(rtc::LS_WARNING) << AsString(rtc::LS_WARNING);
LOG_V(rtc::LS_INFO) << AsString(rtc::LS_INFO);
LOG_V(rtc::LS_VERBOSE) << AsString(rtc::LS_VERBOSE);
LOG_V(rtc::LS_SENSITIVE) << AsString(rtc::LS_SENSITIVE);
LOG_V(talk_base::LS_ERROR) << AsString(talk_base::LS_ERROR);
LOG_V(talk_base::LS_WARNING) << AsString(talk_base::LS_WARNING);
LOG_V(talk_base::LS_INFO) << AsString(talk_base::LS_INFO);
LOG_V(talk_base::LS_VERBOSE) << AsString(talk_base::LS_VERBOSE);
LOG_V(talk_base::LS_SENSITIVE) << AsString(talk_base::LS_SENSITIVE);
// Read file to string.
base::FilePath file_path(log_file_name);
@ -114,14 +114,14 @@ TEST(LibjingleLogTest, InfoConfiguration) {
base::ReadFileToString(file_path, &contents_of_file);
// Make sure string contains the expected values.
EXPECT_TRUE(ContainsString(contents_of_file, AsString(rtc::LS_ERROR)));
EXPECT_TRUE(ContainsString(contents_of_file, AsString(talk_base::LS_ERROR)));
EXPECT_TRUE(ContainsString(contents_of_file,
AsString(rtc::LS_WARNING)));
EXPECT_TRUE(ContainsString(contents_of_file, AsString(rtc::LS_INFO)));
AsString(talk_base::LS_WARNING)));
EXPECT_TRUE(ContainsString(contents_of_file, AsString(talk_base::LS_INFO)));
EXPECT_FALSE(ContainsString(contents_of_file,
AsString(rtc::LS_VERBOSE)));
AsString(talk_base::LS_VERBOSE)));
EXPECT_FALSE(ContainsString(contents_of_file,
AsString(rtc::LS_SENSITIVE)));
AsString(talk_base::LS_SENSITIVE)));
// Also check that the log is proper.
EXPECT_TRUE(ContainsString(contents_of_file, "logging_unittest.cc"));
@ -130,17 +130,17 @@ TEST(LibjingleLogTest, InfoConfiguration) {
}
TEST(LibjingleLogTest, LogEverythingConfiguration) {
ASSERT_TRUE(Initialize(rtc::LS_SENSITIVE));
ASSERT_TRUE(Initialize(talk_base::LS_SENSITIVE));
// In this configuration everything should be logged.
LOG_V(rtc::LS_ERROR) << AsString(rtc::LS_ERROR);
LOG_V(rtc::LS_WARNING) << AsString(rtc::LS_WARNING);
LOG(LS_INFO) << AsString(rtc::LS_INFO);
LOG_V(talk_base::LS_ERROR) << AsString(talk_base::LS_ERROR);
LOG_V(talk_base::LS_WARNING) << AsString(talk_base::LS_WARNING);
LOG(LS_INFO) << AsString(talk_base::LS_INFO);
static const int kFakeError = 1;
LOG_E(LS_INFO, EN, kFakeError) << "LOG_E(" << AsString(rtc::LS_INFO) <<
LOG_E(LS_INFO, EN, kFakeError) << "LOG_E(" << AsString(talk_base::LS_INFO) <<
")";
LOG_V(rtc::LS_VERBOSE) << AsString(rtc::LS_VERBOSE);
LOG_V(rtc::LS_SENSITIVE) << AsString(rtc::LS_SENSITIVE);
LOG_V(talk_base::LS_VERBOSE) << AsString(talk_base::LS_VERBOSE);
LOG_V(talk_base::LS_SENSITIVE) << AsString(talk_base::LS_SENSITIVE);
// Read file to string.
base::FilePath file_path(log_file_name);
@ -148,14 +148,14 @@ TEST(LibjingleLogTest, LogEverythingConfiguration) {
base::ReadFileToString(file_path, &contents_of_file);
// Make sure string contains the expected values.
EXPECT_TRUE(ContainsString(contents_of_file, AsString(rtc::LS_ERROR)));
EXPECT_TRUE(ContainsString(contents_of_file, AsString(talk_base::LS_ERROR)));
EXPECT_TRUE(ContainsString(contents_of_file,
AsString(rtc::LS_WARNING)));
EXPECT_TRUE(ContainsString(contents_of_file, AsString(rtc::LS_INFO)));
AsString(talk_base::LS_WARNING)));
EXPECT_TRUE(ContainsString(contents_of_file, AsString(talk_base::LS_INFO)));
// LOG_E
EXPECT_TRUE(ContainsString(contents_of_file, strerror(kFakeError)));
EXPECT_TRUE(ContainsString(contents_of_file,
AsString(rtc::LS_VERBOSE)));
AsString(talk_base::LS_VERBOSE)));
EXPECT_TRUE(ContainsString(contents_of_file,
AsString(rtc::LS_SENSITIVE)));
AsString(talk_base::LS_SENSITIVE)));
}

@ -6,7 +6,7 @@
namespace jingle_glue {
MockTask::MockTask(TaskParent* parent) : rtc::Task(parent) {}
MockTask::MockTask(TaskParent* parent) : talk_base::Task(parent) {}
MockTask::~MockTask() {}

@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// A mock of rtc::Task.
// A mock of talk_base::Task.
#ifndef JINGLE_GLUE_MOCK_TASK_H_
#define JINGLE_GLUE_MOCK_TASK_H_
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/webrtc/base/task.h"
#include "third_party/libjingle/source/talk/base/task.h"
namespace jingle_glue {
class MockTask : public rtc::Task {
class MockTask : public talk_base::Task {
public:
MockTask(TaskParent* parent);

@ -8,18 +8,18 @@
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "third_party/webrtc/base/taskrunner.h"
#include "third_party/libjingle/source/talk/base/taskrunner.h"
namespace jingle_glue {
// rtc::TaskRunner implementation that works on chromium threads.
class TaskPump : public rtc::TaskRunner, public base::NonThreadSafe {
// talk_base::TaskRunner implementation that works on chromium threads.
class TaskPump : public talk_base::TaskRunner, public base::NonThreadSafe {
public:
TaskPump();
virtual ~TaskPump();
// rtc::TaskRunner implementation.
// talk_base::TaskRunner implementation.
virtual void WakeTasks() OVERRIDE;
virtual int64 CurrentTime() OVERRIDE;

@ -23,7 +23,7 @@ TEST_F(TaskPumpTest, Basic) {
TaskPump task_pump;
MockTask* task = new MockTask(&task_pump);
// We have to do this since the state enum is protected in
// rtc::Task.
// talk_base::Task.
const int TASK_STATE_DONE = 2;
EXPECT_CALL(*task, ProcessStart()).WillOnce(Return(TASK_STATE_DONE));
task->Start();
@ -35,7 +35,7 @@ TEST_F(TaskPumpTest, Stop) {
TaskPump task_pump;
MockTask* task = new MockTask(&task_pump);
// We have to do this since the state enum is protected in
// rtc::Task.
// talk_base::Task.
const int TASK_STATE_ERROR = 3;
ON_CALL(*task, ProcessStart()).WillByDefault(Return(TASK_STATE_ERROR));
EXPECT_CALL(*task, ProcessStart()).Times(0);

@ -8,12 +8,12 @@
#include "base/bind_helpers.h"
#include "base/lazy_instance.h"
#include "base/threading/thread_local.h"
#include "third_party/webrtc/base/nullsocketserver.h"
#include "third_party/libjingle/source/talk/base/nullsocketserver.h"
namespace jingle_glue {
struct JingleThreadWrapper::PendingSend {
PendingSend(const rtc::Message& message_value)
PendingSend(const talk_base::Message& message_value)
: sending_thread(JingleThreadWrapper::current()),
message(message_value),
done_event(true, false) {
@ -21,7 +21,7 @@ struct JingleThreadWrapper::PendingSend {
}
JingleThreadWrapper* sending_thread;
rtc::Message message;
talk_base::Message message;
base::WaitableEvent done_event;
};
@ -37,7 +37,7 @@ void JingleThreadWrapper::EnsureForCurrentMessageLoop() {
message_loop->AddDestructionObserver(current());
}
DCHECK_EQ(rtc::Thread::Current(), current());
DCHECK_EQ(talk_base::Thread::Current(), current());
}
// static
@ -47,48 +47,48 @@ JingleThreadWrapper* JingleThreadWrapper::current() {
JingleThreadWrapper::JingleThreadWrapper(
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: rtc::Thread(new rtc::NullSocketServer()),
: talk_base::Thread(new talk_base::NullSocketServer()),
task_runner_(task_runner),
send_allowed_(false),
last_task_id_(0),
pending_send_event_(true, false),
weak_ptr_factory_(this) {
DCHECK(task_runner->BelongsToCurrentThread());
DCHECK(!rtc::Thread::Current());
DCHECK(!talk_base::Thread::Current());
weak_ptr_ = weak_ptr_factory_.GetWeakPtr();
rtc::MessageQueueManager::Add(this);
talk_base::MessageQueueManager::Add(this);
WrapCurrent();
}
JingleThreadWrapper::~JingleThreadWrapper() {
Clear(NULL, rtc::MQID_ANY, NULL);
Clear(NULL, talk_base::MQID_ANY, NULL);
}
void JingleThreadWrapper::WillDestroyCurrentMessageLoop() {
DCHECK_EQ(rtc::Thread::Current(), current());
DCHECK_EQ(talk_base::Thread::Current(), current());
UnwrapCurrent();
g_jingle_thread_wrapper.Get().Set(NULL);
rtc::ThreadManager::Instance()->SetCurrentThread(NULL);
rtc::MessageQueueManager::Remove(this);
rtc::SocketServer* ss = socketserver();
talk_base::ThreadManager::Instance()->SetCurrentThread(NULL);
talk_base::MessageQueueManager::Remove(this);
talk_base::SocketServer* ss = socketserver();
delete this;
delete ss;
}
void JingleThreadWrapper::Post(
rtc::MessageHandler* handler, uint32 message_id,
rtc::MessageData* data, bool time_sensitive) {
talk_base::MessageHandler* handler, uint32 message_id,
talk_base::MessageData* data, bool time_sensitive) {
PostTaskInternal(0, handler, message_id, data);
}
void JingleThreadWrapper::PostDelayed(
int delay_ms, rtc::MessageHandler* handler,
uint32 message_id, rtc::MessageData* data) {
int delay_ms, talk_base::MessageHandler* handler,
uint32 message_id, talk_base::MessageData* data) {
PostTaskInternal(delay_ms, handler, message_id, data);
}
void JingleThreadWrapper::Clear(rtc::MessageHandler* handler, uint32 id,
rtc::MessageList* removed) {
void JingleThreadWrapper::Clear(talk_base::MessageHandler* handler, uint32 id,
talk_base::MessageList* removed) {
base::AutoLock auto_lock(lock_);
for (MessagesQueue::iterator it = messages_.begin();
@ -127,8 +127,8 @@ void JingleThreadWrapper::Clear(rtc::MessageHandler* handler, uint32 id,
}
}
void JingleThreadWrapper::Send(rtc::MessageHandler *handler, uint32 id,
rtc::MessageData *data) {
void JingleThreadWrapper::Send(talk_base::MessageHandler *handler, uint32 id,
talk_base::MessageData *data) {
if (fStop_)
return;
@ -136,7 +136,7 @@ void JingleThreadWrapper::Send(rtc::MessageHandler *handler, uint32 id,
DCHECK(current_thread != NULL) << "Send() can be called only from a "
"thread that has JingleThreadWrapper.";
rtc::Message message;
talk_base::Message message;
message.phandler = handler;
message.message_id = id;
message.pdata = data;
@ -200,17 +200,17 @@ void JingleThreadWrapper::ProcessPendingSends() {
}
void JingleThreadWrapper::PostTaskInternal(
int delay_ms, rtc::MessageHandler* handler,
uint32 message_id, rtc::MessageData* data) {
int delay_ms, talk_base::MessageHandler* handler,
uint32 message_id, talk_base::MessageData* data) {
int task_id;
rtc::Message message;
talk_base::Message message;
message.phandler = handler;
message.message_id = message_id;
message.pdata = data;
{
base::AutoLock auto_lock(lock_);
task_id = ++last_task_id_;
messages_.insert(std::pair<int, rtc::Message>(task_id, message));
messages_.insert(std::pair<int, talk_base::Message>(task_id, message));
}
if (delay_ms <= 0) {
@ -227,7 +227,7 @@ void JingleThreadWrapper::PostTaskInternal(
void JingleThreadWrapper::RunTask(int task_id) {
bool have_message = false;
rtc::Message message;
talk_base::Message message;
{
base::AutoLock auto_lock(lock_);
MessagesQueue::iterator it = messages_.find(task_id);
@ -239,7 +239,7 @@ void JingleThreadWrapper::RunTask(int task_id) {
}
if (have_message) {
if (message.message_id == rtc::MQID_DISPOSE) {
if (message.message_id == talk_base::MQID_DISPOSE) {
DCHECK(message.phandler == NULL);
delete message.pdata;
} else {
@ -263,22 +263,22 @@ void JingleThreadWrapper::Restart() {
NOTREACHED();
}
bool JingleThreadWrapper::Get(rtc::Message*, int, bool) {
bool JingleThreadWrapper::Get(talk_base::Message*, int, bool) {
NOTREACHED();
return false;
}
bool JingleThreadWrapper::Peek(rtc::Message*, int) {
bool JingleThreadWrapper::Peek(talk_base::Message*, int) {
NOTREACHED();
return false;
}
void JingleThreadWrapper::PostAt(uint32, rtc::MessageHandler*,
uint32, rtc::MessageData*) {
void JingleThreadWrapper::PostAt(uint32, talk_base::MessageHandler*,
uint32, talk_base::MessageData*) {
NOTREACHED();
}
void JingleThreadWrapper::Dispatch(rtc::Message* message) {
void JingleThreadWrapper::Dispatch(talk_base::Message* message) {
NOTREACHED();
}

@ -12,11 +12,11 @@
#include "base/message_loop/message_loop.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
#include "third_party/webrtc/base/thread.h"
#include "third_party/libjingle/source/talk/base/thread.h"
namespace jingle_glue {
// JingleThreadWrapper implements rtc::Thread interface on top of
// JingleThreadWrapper implements talk_base::Thread interface on top of
// Chromium's SingleThreadTaskRunner interface. Currently only the bare minimum
// that is used by P2P part of libjingle is implemented. There are two ways to
// create this object:
@ -28,7 +28,7 @@ namespace jingle_glue {
// must pass a valid task runner for the current thread and also delete the
// wrapper later.
class JingleThreadWrapper : public base::MessageLoop::DestructionObserver,
public rtc::Thread {
public talk_base::Thread {
public:
// Create JingleThreadWrapper for the current thread if it hasn't been created
// yet. The thread wrapper is destroyed automatically when the current
@ -54,21 +54,21 @@ class JingleThreadWrapper : public base::MessageLoop::DestructionObserver,
// MessageLoop::DestructionObserver implementation.
virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
// rtc::MessageQueue overrides.
virtual void Post(rtc::MessageHandler *phandler,
// talk_base::MessageQueue overrides.
virtual void Post(talk_base::MessageHandler *phandler,
uint32 id,
rtc::MessageData *pdata,
talk_base::MessageData *pdata,
bool time_sensitive) OVERRIDE;
virtual void PostDelayed(int delay_ms,
rtc::MessageHandler* handler,
talk_base::MessageHandler* handler,
uint32 id,
rtc::MessageData* data) OVERRIDE;
virtual void Clear(rtc::MessageHandler* handler,
talk_base::MessageData* data) OVERRIDE;
virtual void Clear(talk_base::MessageHandler* handler,
uint32 id,
rtc::MessageList* removed) OVERRIDE;
virtual void Send(rtc::MessageHandler *handler,
talk_base::MessageList* removed) OVERRIDE;
virtual void Send(talk_base::MessageHandler *handler,
uint32 id,
rtc::MessageData *data) OVERRIDE;
talk_base::MessageData *data) OVERRIDE;
// Following methods are not supported.They are overriden just to
// ensure that they are not called (each of them contain NOTREACHED
@ -77,30 +77,30 @@ class JingleThreadWrapper : public base::MessageLoop::DestructionObserver,
virtual void Quit() OVERRIDE;
virtual bool IsQuitting() OVERRIDE;
virtual void Restart() OVERRIDE;
virtual bool Get(rtc::Message* message,
virtual bool Get(talk_base::Message* message,
int delay_ms,
bool process_io) OVERRIDE;
virtual bool Peek(rtc::Message* message,
virtual bool Peek(talk_base::Message* message,
int delay_ms) OVERRIDE;
virtual void PostAt(uint32 timestamp,
rtc::MessageHandler* handler,
talk_base::MessageHandler* handler,
uint32 id,
rtc::MessageData* data) OVERRIDE;
virtual void Dispatch(rtc::Message* message) OVERRIDE;
talk_base::MessageData* data) OVERRIDE;
virtual void Dispatch(talk_base::Message* message) OVERRIDE;
virtual void ReceiveSends() OVERRIDE;
virtual int GetDelay() OVERRIDE;
// rtc::Thread overrides.
// talk_base::Thread overrides.
virtual void Stop() OVERRIDE;
virtual void Run() OVERRIDE;
private:
typedef std::map<int, rtc::Message> MessagesQueue;
typedef std::map<int, talk_base::Message> MessagesQueue;
struct PendingSend;
void PostTaskInternal(
int delay_ms, rtc::MessageHandler* handler,
uint32 message_id, rtc::MessageData* data);
int delay_ms, talk_base::MessageHandler* handler,
uint32 message_id, talk_base::MessageData* data);
void RunTask(int task_id);
void ProcessPendingSends();

@ -28,9 +28,9 @@ static const int kMaxTestDelay = 40;
namespace {
class MockMessageHandler : public rtc::MessageHandler {
class MockMessageHandler : public talk_base::MessageHandler {
public:
MOCK_METHOD1(OnMessage, void(rtc::Message* msg));
MOCK_METHOD1(OnMessage, void(talk_base::Message* msg));
};
MATCHER_P3(MatchMessage, handler, message_id, data, "") {
@ -66,7 +66,7 @@ class ThreadWrapperTest : public testing::Test {
// This method is used by the SendDuringSend test. It sends message to the
// main thread synchronously using Send().
void PingMainThread() {
rtc::MessageData* data = new rtc::MessageData();
talk_base::MessageData* data = new talk_base::MessageData();
MockMessageHandler handler;
EXPECT_CALL(handler, OnMessage(
@ -82,21 +82,21 @@ class ThreadWrapperTest : public testing::Test {
virtual void SetUp() OVERRIDE {
JingleThreadWrapper::EnsureForCurrentMessageLoop();
thread_ = rtc::Thread::Current();
thread_ = talk_base::Thread::Current();
}
// ThreadWrapper destroyes itself when |message_loop_| is destroyed.
base::MessageLoop message_loop_;
rtc::Thread* thread_;
talk_base::Thread* thread_;
MockMessageHandler handler1_;
MockMessageHandler handler2_;
};
TEST_F(ThreadWrapperTest, Post) {
rtc::MessageData* data1 = new rtc::MessageData();
rtc::MessageData* data2 = new rtc::MessageData();
rtc::MessageData* data3 = new rtc::MessageData();
rtc::MessageData* data4 = new rtc::MessageData();
talk_base::MessageData* data1 = new talk_base::MessageData();
talk_base::MessageData* data2 = new talk_base::MessageData();
talk_base::MessageData* data3 = new talk_base::MessageData();
talk_base::MessageData* data4 = new talk_base::MessageData();
thread_->Post(&handler1_, kTestMessage1, data1);
thread_->Post(&handler1_, kTestMessage2, data2);
@ -122,10 +122,10 @@ TEST_F(ThreadWrapperTest, Post) {
}
TEST_F(ThreadWrapperTest, PostDelayed) {
rtc::MessageData* data1 = new rtc::MessageData();
rtc::MessageData* data2 = new rtc::MessageData();
rtc::MessageData* data3 = new rtc::MessageData();
rtc::MessageData* data4 = new rtc::MessageData();
talk_base::MessageData* data1 = new talk_base::MessageData();
talk_base::MessageData* data2 = new talk_base::MessageData();
talk_base::MessageData* data3 = new talk_base::MessageData();
talk_base::MessageData* data4 = new talk_base::MessageData();
thread_->PostDelayed(kTestDelayMs1, &handler1_, kTestMessage1, data1);
thread_->PostDelayed(kTestDelayMs2, &handler1_, kTestMessage2, data2);
@ -164,7 +164,7 @@ TEST_F(ThreadWrapperTest, Clear) {
InSequence in_seq;
rtc::MessageData* null_data = NULL;
talk_base::MessageData* null_data = NULL;
EXPECT_CALL(handler1_, OnMessage(
MatchMessage(&handler1_, kTestMessage1, null_data)))
.WillOnce(DeleteMessageData());
@ -188,7 +188,7 @@ TEST_F(ThreadWrapperTest, ClearDelayed) {
InSequence in_seq;
rtc::MessageData* null_data = NULL;
talk_base::MessageData* null_data = NULL;
EXPECT_CALL(handler1_, OnMessage(
MatchMessage(&handler1_, kTestMessage1, null_data)))
.WillOnce(DeleteMessageData());
@ -214,15 +214,15 @@ TEST_F(ThreadWrapperTest, ClearDestoroyed) {
handler_ptr = &handler;
thread_->Post(&handler, kTestMessage1, NULL);
}
rtc::MessageList removed;
thread_->Clear(handler_ptr, rtc::MQID_ANY, &removed);
talk_base::MessageList removed;
thread_->Clear(handler_ptr, talk_base::MQID_ANY, &removed);
DCHECK_EQ(0U, removed.size());
}
// Verify that Send() calls handler synchronously when called on the
// same thread.
TEST_F(ThreadWrapperTest, SendSameThread) {
rtc::MessageData* data = new rtc::MessageData();
talk_base::MessageData* data = new talk_base::MessageData();
EXPECT_CALL(handler1_, OnMessage(
MatchMessage(&handler1_, kTestMessage1, data)))
@ -230,7 +230,7 @@ TEST_F(ThreadWrapperTest, SendSameThread) {
thread_->Send(&handler1_, kTestMessage1, data);
}
void InitializeWrapperForNewThread(rtc::Thread** thread,
void InitializeWrapperForNewThread(talk_base::Thread** thread,
base::WaitableEvent* done_event) {
JingleThreadWrapper::EnsureForCurrentMessageLoop();
JingleThreadWrapper::current()->set_send_allowed(true);
@ -247,7 +247,7 @@ TEST_F(ThreadWrapperTest, SendToOtherThread) {
second_thread.Start();
base::WaitableEvent initialized_event(true, false);
rtc::Thread* target;
talk_base::Thread* target;
second_thread.message_loop()->PostTask(
FROM_HERE, base::Bind(&InitializeWrapperForNewThread,
&target, &initialized_event));
@ -255,7 +255,7 @@ TEST_F(ThreadWrapperTest, SendToOtherThread) {
ASSERT_TRUE(target != NULL);
rtc::MessageData* data = new rtc::MessageData();
talk_base::MessageData* data = new talk_base::MessageData();
EXPECT_CALL(handler1_, OnMessage(
MatchMessage(&handler1_, kTestMessage1, data)))
@ -276,7 +276,7 @@ TEST_F(ThreadWrapperTest, SendDuringSend) {
second_thread.Start();
base::WaitableEvent initialized_event(true, false);
rtc::Thread* target;
talk_base::Thread* target;
second_thread.message_loop()->PostTask(
FROM_HERE, base::Bind(&InitializeWrapperForNewThread,
&target, &initialized_event));
@ -284,7 +284,7 @@ TEST_F(ThreadWrapperTest, SendDuringSend) {
ASSERT_TRUE(target != NULL);
rtc::MessageData* data = new rtc::MessageData();
talk_base::MessageData* data = new talk_base::MessageData();
EXPECT_CALL(handler1_, OnMessage(
MatchMessage(&handler1_, kTestMessage1, data)))

@ -11,21 +11,21 @@
#include "base/values.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_util.h"
#include "third_party/libjingle/source/talk/base/byteorder.h"
#include "third_party/libjingle/source/talk/base/socketaddress.h"
#include "third_party/libjingle/source/talk/p2p/base/candidate.h"
#include "third_party/webrtc/base/byteorder.h"
#include "third_party/webrtc/base/socketaddress.h"
namespace jingle_glue {
bool IPEndPointToSocketAddress(const net::IPEndPoint& ip_endpoint,
rtc::SocketAddress* address) {
talk_base::SocketAddress* address) {
sockaddr_storage addr;
socklen_t len = sizeof(addr);
return ip_endpoint.ToSockAddr(reinterpret_cast<sockaddr*>(&addr), &len) &&
rtc::SocketAddressFromSockAddrStorage(addr, address);
talk_base::SocketAddressFromSockAddrStorage(addr, address);
}
bool SocketAddressToIPEndPoint(const rtc::SocketAddress& address,
bool SocketAddressToIPEndPoint(const talk_base::SocketAddress& address,
net::IPEndPoint* ip_endpoint) {
sockaddr_storage addr;
int size = address.ToSockAddrStorage(&addr);
@ -81,7 +81,7 @@ bool DeserializeP2PCandidate(const std::string& candidate_str,
return false;
}
candidate->set_address(rtc::SocketAddress(ip, port));
candidate->set_address(talk_base::SocketAddress(ip, port));
candidate->set_type(type);
candidate->set_protocol(protocol);
candidate->set_username(username);

@ -11,9 +11,9 @@ namespace net {
class IPEndPoint;
} // namespace net
namespace rtc {
namespace talk_base {
class SocketAddress;
} // namespace rtc
} // namespace talk_base
namespace cricket {
class Candidate;
@ -25,8 +25,8 @@ namespace jingle_glue {
// following two functions are used to convert addresses from one
// representation to another.
bool IPEndPointToSocketAddress(const net::IPEndPoint& ip_endpoint,
rtc::SocketAddress* address);
bool SocketAddressToIPEndPoint(const rtc::SocketAddress& address,
talk_base::SocketAddress* address);
bool SocketAddressToIPEndPoint(const talk_base::SocketAddress& address,
net::IPEndPoint* ip_endpoint);
// Helper functions to serialize and deserialize P2P candidates.

@ -3,5 +3,4 @@ include_rules = [
"+talk/base",
"+talk/xmpp",
"+talk/xmllite",
"+webrtc/base",
]

@ -20,7 +20,7 @@ class MockAsyncSocket : public buzz::AsyncSocket {
MOCK_METHOD0(state, State());
MOCK_METHOD0(error, Error());
MOCK_METHOD0(GetError, int());
MOCK_METHOD1(Connect, bool(const rtc::SocketAddress&));
MOCK_METHOD1(Connect, bool(const talk_base::SocketAddress&));
MOCK_METHOD3(Read, bool(char*, size_t, size_t*));
MOCK_METHOD2(Write, bool(const char*, size_t));
MOCK_METHOD0(Close, bool());
@ -35,7 +35,7 @@ namespace {
// PushNotificationsSubscribeTask.
class FakeWeakXmppClient : public notifier::WeakXmppClient {
public:
explicit FakeWeakXmppClient(rtc::TaskParent* parent)
explicit FakeWeakXmppClient(talk_base::TaskParent* parent)
: notifier::WeakXmppClient(parent),
jid_("test@example.com/testresource") {}

@ -8,9 +8,9 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "talk/base/socketaddress.h"
#include "talk/xmpp/constants.h"
#include "talk/xmpp/saslcookiemechanism.h"
#include "webrtc/base/socketaddress.h"
namespace notifier {
@ -64,8 +64,8 @@ GaiaTokenPreXmppAuth::~GaiaTokenPreXmppAuth() { }
void GaiaTokenPreXmppAuth::StartPreXmppAuth(
const buzz::Jid& jid,
const rtc::SocketAddress& server,
const rtc::CryptString& pass,
const talk_base::SocketAddress& server,
const talk_base::CryptString& pass,
const std::string& auth_mechanism,
const std::string& auth_token) {
SignalAuthDone();

@ -28,8 +28,8 @@ class GaiaTokenPreXmppAuth : public buzz::PreXmppAuth {
// all the methods out as we don't actually do any authentication at
// this point.
virtual void StartPreXmppAuth(const buzz::Jid& jid,
const rtc::SocketAddress& server,
const rtc::CryptString& pass,
const talk_base::SocketAddress& server,
const talk_base::CryptString& pass,
const std::string& auth_mechanism,
const std::string& auth_token) OVERRIDE;

@ -8,7 +8,7 @@
namespace notifier {
WeakXmppClient::WeakXmppClient(rtc::TaskParent* parent)
WeakXmppClient::WeakXmppClient(talk_base::TaskParent* parent)
: buzz::XmppClient(parent),
weak_ptr_factory_(this) {}

@ -15,18 +15,18 @@
#include "base/threading/non_thread_safe.h"
#include "talk/xmpp/xmppclient.h"
namespace rtc {
namespace talk_base {
class TaskParent;
} // namespace
namespace notifier {
// buzz::XmppClient's destructor isn't marked virtual, but it inherits
// from rtc::Task, whose destructor *is* marked virtual, so we
// from talk_base::Task, whose destructor *is* marked virtual, so we
// can safely inherit from it.
class WeakXmppClient : public buzz::XmppClient, public base::NonThreadSafe {
public:
explicit WeakXmppClient(rtc::TaskParent* parent);
explicit WeakXmppClient(talk_base::TaskParent* parent);
virtual ~WeakXmppClient();

@ -9,9 +9,9 @@
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "jingle/glue/task_pump.h"
#include "talk/base/sigslot.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/sigslot.h"
namespace notifier {

@ -14,8 +14,8 @@
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "net/url_request/url_request_context_getter.h"
#include "talk/base/sigslot.h"
#include "talk/xmpp/xmppengine.h"
#include "webrtc/base/sigslot.h"
namespace buzz {
class PreXmppAuth;

@ -28,11 +28,11 @@ class CaptchaChallenge;
class Jid;
} // namespace buzz
namespace rtc {
namespace talk_base {
class CryptString;
class SocketAddress;
class Task;
} // namespace rtc
} // namespace talk_base
namespace notifier {
@ -50,8 +50,8 @@ class MockPreXmppAuth : public buzz::PreXmppAuth {
buzz::SaslMechanism*(const std::string&));
MOCK_METHOD5(StartPreXmppAuth,
void(const buzz::Jid&,
const rtc::SocketAddress&,
const rtc::CryptString&,
const talk_base::SocketAddress&,
const talk_base::CryptString&,
const std::string&,
const std::string&));
MOCK_CONST_METHOD0(IsAuthDone, bool());
@ -172,7 +172,7 @@ TEST_F(XmppConnectionTest, RaisedError) {
#endif
TEST_F(XmppConnectionTest, Connect) {
base::WeakPtr<rtc::Task> weak_ptr;
base::WeakPtr<talk_base::Task> weak_ptr;
EXPECT_CALL(mock_xmpp_connection_delegate_, OnConnect(_)).
WillOnce(SaveArg<0>(&weak_ptr));
@ -191,7 +191,7 @@ TEST_F(XmppConnectionTest, Connect) {
TEST_F(XmppConnectionTest, MultipleConnect) {
EXPECT_DEBUG_DEATH({
base::WeakPtr<rtc::Task> weak_ptr;
base::WeakPtr<talk_base::Task> weak_ptr;
EXPECT_CALL(mock_xmpp_connection_delegate_, OnConnect(_)).
WillOnce(SaveArg<0>(&weak_ptr));
@ -212,7 +212,7 @@ TEST_F(XmppConnectionTest, MultipleConnect) {
#if !defined(_MSC_VER) || _MSC_VER < 1700 // http://crbug.com/158570
TEST_F(XmppConnectionTest, ConnectThenError) {
base::WeakPtr<rtc::Task> weak_ptr;
base::WeakPtr<talk_base::Task> weak_ptr;
EXPECT_CALL(mock_xmpp_connection_delegate_, OnConnect(_)).
WillOnce(SaveArg<0>(&weak_ptr));
EXPECT_CALL(mock_xmpp_connection_delegate_,
@ -243,7 +243,7 @@ TEST_F(XmppConnectionTest, TasksDontRunAfterXmppConnectionDestructor) {
jingle_glue::MockTask* task =
new jingle_glue::MockTask(xmpp_connection.task_pump_.get());
// We have to do this since the state enum is protected in
// rtc::Task.
// talk_base::Task.
const int TASK_STATE_ERROR = 3;
ON_CALL(*task, ProcessStart())
.WillByDefault(Return(TASK_STATE_ERROR));

@ -18,7 +18,7 @@ namespace notifier {
const uint16 kSslTcpPort = 443;
ConnectionSettings::ConnectionSettings(
const rtc::SocketAddress& server,
const talk_base::SocketAddress& server,
SslTcpMode ssltcp_mode,
SslTcpSupport ssltcp_support)
: server(server),
@ -76,12 +76,12 @@ ConnectionSettingsList MakeConnectionSettingsList(
for (ServerList::const_iterator it = servers.begin();
it != servers.end(); ++it) {
const ConnectionSettings settings(
rtc::SocketAddress(it->server.host(), it->server.port()),
talk_base::SocketAddress(it->server.host(), it->server.port()),
DO_NOT_USE_SSLTCP, it->ssltcp_support);
if (it->ssltcp_support == SUPPORTS_SSLTCP) {
const ConnectionSettings settings_with_ssltcp(
rtc::SocketAddress(it->server.host(), kSslTcpPort),
talk_base::SocketAddress(it->server.host(), kSslTcpPort),
USE_SSLTCP, it->ssltcp_support);
if (try_ssltcp_first) {

@ -10,7 +10,7 @@
#include "base/basictypes.h"
#include "jingle/notifier/base/server_information.h"
#include "webrtc/base/socketaddress.h"
#include "talk/base/socketaddress.h"
namespace buzz {
class XmppClientSettings;
@ -25,7 +25,7 @@ enum SslTcpMode { DO_NOT_USE_SSLTCP, USE_SSLTCP };
struct ConnectionSettings {
public:
ConnectionSettings(const rtc::SocketAddress& server,
ConnectionSettings(const talk_base::SocketAddress& server,
SslTcpMode ssltcp_mode,
SslTcpSupport ssltcp_support);
ConnectionSettings();
@ -38,7 +38,7 @@ struct ConnectionSettings {
// Fill in the connection-related fields of |client_settings|.
void FillXmppClientSettings(buzz::XmppClientSettings* client_settings) const;
rtc::SocketAddress server;
talk_base::SocketAddress server;
SslTcpMode ssltcp_mode;
SslTcpSupport ssltcp_support;
};

@ -44,17 +44,17 @@ TEST_F(ConnectionSettingsTest, Basic) {
ConnectionSettingsList expected_settings_list;
expected_settings_list.push_back(
ConnectionSettings(
rtc::SocketAddress("supports_ssltcp.com", 100),
talk_base::SocketAddress("supports_ssltcp.com", 100),
DO_NOT_USE_SSLTCP,
SUPPORTS_SSLTCP));
expected_settings_list.push_back(
ConnectionSettings(
rtc::SocketAddress("supports_ssltcp.com", 443),
talk_base::SocketAddress("supports_ssltcp.com", 443),
USE_SSLTCP,
SUPPORTS_SSLTCP));
expected_settings_list.push_back(
ConnectionSettings(
rtc::SocketAddress("does_not_support_ssltcp.com", 200),
talk_base::SocketAddress("does_not_support_ssltcp.com", 200),
DO_NOT_USE_SSLTCP,
DOES_NOT_SUPPORT_SSLTCP));
@ -74,17 +74,17 @@ TEST_F(ConnectionSettingsTest, TrySslTcpFirst) {
ConnectionSettingsList expected_settings_list;
expected_settings_list.push_back(
ConnectionSettings(
rtc::SocketAddress("supports_ssltcp.com", 443),
talk_base::SocketAddress("supports_ssltcp.com", 443),
USE_SSLTCP,
SUPPORTS_SSLTCP));
expected_settings_list.push_back(
ConnectionSettings(
rtc::SocketAddress("supports_ssltcp.com", 100),
talk_base::SocketAddress("supports_ssltcp.com", 100),
DO_NOT_USE_SSLTCP,
SUPPORTS_SSLTCP));
expected_settings_list.push_back(
ConnectionSettings(
rtc::SocketAddress("does_not_support_ssltcp.com", 200),
talk_base::SocketAddress("does_not_support_ssltcp.com", 200),
DO_NOT_USE_SSLTCP,
DOES_NOT_SUPPORT_SSLTCP));

@ -10,17 +10,17 @@
#include "base/rand_util.h"
#include "base/time/time.h"
#include "net/base/host_port_pair.h"
#include "talk/base/common.h"
#include "talk/base/firewallsocketserver.h"
#include "talk/base/logging.h"
#include "talk/base/physicalsocketserver.h"
#include "talk/base/taskrunner.h"
#include "talk/xmllite/xmlelement.h"
#include "talk/xmpp/asyncsocket.h"
#include "talk/xmpp/prexmppauth.h"
#include "talk/xmpp/xmppclient.h"
#include "talk/xmpp/xmppclientsettings.h"
#include "talk/xmpp/xmppengine.h"
#include "webrtc/base/common.h"
#include "webrtc/base/firewallsocketserver.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/physicalsocketserver.h"
#include "webrtc/base/taskrunner.h"
namespace notifier {

@ -9,8 +9,8 @@
#include "base/logging.h"
#include "jingle/notifier/base/server_information.h"
#include "net/cert/cert_verifier.h"
#include "webrtc/base/common.h"
#include "webrtc/base/socketaddress.h"
#include "talk/base/common.h"
#include "talk/base/socketaddress.h"
namespace notifier {

@ -9,12 +9,12 @@
#include "jingle/notifier/listener/notification_constants.h"
#include "jingle/notifier/listener/notification_defines.h"
#include "jingle/notifier/listener/xml_element_util.h"
#include "talk/base/task.h"
#include "talk/xmllite/qname.h"
#include "talk/xmllite/xmlelement.h"
#include "talk/xmpp/constants.h"
#include "talk/xmpp/xmppclient.h"
#include "talk/xmpp/constants.h"
#include "talk/xmpp/xmppengine.h"
#include "webrtc/base/task.h"
namespace notifier {

@ -10,12 +10,12 @@
#include "base/memory/scoped_ptr.h"
#include "jingle/notifier/listener/notification_constants.h"
#include "jingle/notifier/listener/xml_element_util.h"
#include "talk/base/task.h"
#include "talk/xmllite/qname.h"
#include "talk/xmllite/xmlelement.h"
#include "talk/xmpp/constants.h"
#include "talk/xmpp/xmppclient.h"
#include "talk/xmpp/constants.h"
#include "talk/xmpp/xmppengine.h"
#include "webrtc/base/task.h"
namespace notifier {

@ -15,7 +15,6 @@ include_rules = [
"+third_party/libjingle",
"+third_party/libvpx",
"+third_party/libyuv",
"+third_party/webrtc/base",
"+third_party/webrtc/modules/desktop_capture",
"+ui/base/keycodes",
]

@ -9,8 +9,8 @@
#include <vector>
#if defined(OS_NACL)
#include <nacl_io/nacl_io.h>
#include <sys/mount.h>
#include <nacl_io/nacl_io.h>
#endif
#include "base/bind.h"
@ -52,8 +52,8 @@
#include "remoting/protocol/connection_to_host.h"
#include "remoting/protocol/host_stub.h"
#include "remoting/protocol/libjingle_transport_factory.h"
#include "third_party/webrtc/base/helpers.h"
#include "third_party/webrtc/base/ssladapter.h"
#include "third_party/libjingle/source/talk/base/helpers.h"
#include "third_party/libjingle/source/talk/base/ssladapter.h"
#include "url/gurl.h"
// Windows defines 'PostMessage', so we have to undef it.
@ -247,12 +247,12 @@ ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
// Initialize random seed for libjingle. It's necessary only with OpenSSL.
char random_seed[kRandomSeedSize];
crypto::RandBytes(random_seed, sizeof(random_seed));
rtc::InitRandom(random_seed, sizeof(random_seed));
talk_base::InitRandom(random_seed, sizeof(random_seed));
#else
// Libjingle's SSL implementation is not really used, but it has to be
// initialized for NSS builds to make sure that RNG is initialized in NSS,
// because libjingle uses it.
rtc::InitializeSSL();
talk_base::InitializeSSL();
#endif // !defined(USE_OPENSSL)
// Send hello message.

@ -12,7 +12,7 @@
#include "ppapi/cpp/net_address.h"
#include "ppapi/cpp/network_list.h"
#include "remoting/client/plugin/pepper_util.h"
#include "third_party/webrtc/base/socketaddress.h"
#include "third_party/libjingle/source/talk/base/socketaddress.h"
namespace remoting {
@ -63,8 +63,8 @@ void PepperNetworkManager::OnNetworkList(int32_t result,
&PepperNetworkManager::OnNetworkList);
monitor_.UpdateNetworkList(callback);
// Convert the networks to rtc::Network.
std::vector<rtc::Network*> networks;
// Convert the networks to talk_base::Network.
std::vector<talk_base::Network*> networks;
size_t count = list.GetCount();
for (size_t i = 0; i < count; i++) {
std::vector<pp::NetAddress> addresses;
@ -74,7 +74,7 @@ void PepperNetworkManager::OnNetworkList(int32_t result,
continue;
for (size_t i = 0; i < addresses.size(); ++i) {
rtc::SocketAddress address;
talk_base::SocketAddress address;
PpNetAddressToSocketAddress(addresses[i], &address);
if (address.family() == AF_INET6 && IPIsSiteLocal(address.ipaddr())) {
@ -84,7 +84,7 @@ void PepperNetworkManager::OnNetworkList(int32_t result,
continue;
}
rtc::Network* network = new rtc::Network(
talk_base::Network* network = new talk_base::Network(
list.GetName(i), list.GetDisplayName(i), address.ipaddr(), 0);
network->AddIP(address.ipaddr());
networks.push_back(network);

@ -10,7 +10,7 @@
#include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/network_monitor.h"
#include "ppapi/utility/completion_callback_factory.h"
#include "third_party/webrtc/base/network.h"
#include "third_party/libjingle/source/talk/base/network.h"
namespace pp {
class NetworkList;
@ -21,7 +21,7 @@ namespace remoting {
// PepperNetworkManager uses the PPB_NetworkMonitor API to
// implement the NetworkManager interface that libjingle uses to
// monitor the host system's network interfaces.
class PepperNetworkManager : public rtc::NetworkManagerBase {
class PepperNetworkManager : public talk_base::NetworkManagerBase {
public:
PepperNetworkManager(const pp::InstanceHandle& instance);
virtual ~PepperNetworkManager();

@ -13,7 +13,7 @@
#include "ppapi/utility/completion_callback_factory.h"
#include "remoting/client/plugin/pepper_util.h"
#include "remoting/protocol/socket_util.h"
#include "third_party/webrtc/base/asyncpacketsocket.h"
#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
namespace remoting {
@ -81,30 +81,30 @@ int PepperErrorToNetError(int error) {
}
}
class UdpPacketSocket : public rtc::AsyncPacketSocket {
class UdpPacketSocket : public talk_base::AsyncPacketSocket {
public:
explicit UdpPacketSocket(const pp::InstanceHandle& instance);
virtual ~UdpPacketSocket();
// |min_port| and |max_port| are set to zero if the port number
// should be assigned by the OS.
bool Init(const rtc::SocketAddress& local_address,
bool Init(const talk_base::SocketAddress& local_address,
int min_port,
int max_port);
// rtc::AsyncPacketSocket interface.
virtual rtc::SocketAddress GetLocalAddress() const OVERRIDE;
virtual rtc::SocketAddress GetRemoteAddress() const OVERRIDE;
// talk_base::AsyncPacketSocket interface.
virtual talk_base::SocketAddress GetLocalAddress() const OVERRIDE;
virtual talk_base::SocketAddress GetRemoteAddress() const OVERRIDE;
virtual int Send(const void* data, size_t data_size,
const rtc::PacketOptions& options) OVERRIDE;
const talk_base::PacketOptions& options) OVERRIDE;
virtual int SendTo(const void* data,
size_t data_size,
const rtc::SocketAddress& address,
const rtc::PacketOptions& options) OVERRIDE;
const talk_base::SocketAddress& address,
const talk_base::PacketOptions& options) OVERRIDE;
virtual int Close() OVERRIDE;
virtual State GetState() const OVERRIDE;
virtual int GetOption(rtc::Socket::Option opt, int* value) OVERRIDE;
virtual int SetOption(rtc::Socket::Option opt, int value) OVERRIDE;
virtual int GetOption(talk_base::Socket::Option opt, int* value) OVERRIDE;
virtual int SetOption(talk_base::Socket::Option opt, int value) OVERRIDE;
virtual int GetError() const OVERRIDE;
virtual void SetError(int error) OVERRIDE;
@ -135,7 +135,7 @@ class UdpPacketSocket : public rtc::AsyncPacketSocket {
State state_;
int error_;
rtc::SocketAddress local_address_;
talk_base::SocketAddress local_address_;
// Used to scan ports when necessary. Both values are set to 0 when
// the port number is assigned by OS.
@ -179,7 +179,7 @@ UdpPacketSocket::~UdpPacketSocket() {
Close();
}
bool UdpPacketSocket::Init(const rtc::SocketAddress& local_address,
bool UdpPacketSocket::Init(const talk_base::SocketAddress& local_address,
int min_port,
int max_port) {
if (socket_.is_null()) {
@ -239,19 +239,19 @@ void UdpPacketSocket::OnBindCompleted(int result) {
}
}
rtc::SocketAddress UdpPacketSocket::GetLocalAddress() const {
talk_base::SocketAddress UdpPacketSocket::GetLocalAddress() const {
DCHECK_EQ(state_, STATE_BOUND);
return local_address_;
}
rtc::SocketAddress UdpPacketSocket::GetRemoteAddress() const {
talk_base::SocketAddress UdpPacketSocket::GetRemoteAddress() const {
// UDP sockets are not connected - this method should never be called.
NOTREACHED();
return rtc::SocketAddress();
return talk_base::SocketAddress();
}
int UdpPacketSocket::Send(const void* data, size_t data_size,
const rtc::PacketOptions& options) {
const talk_base::PacketOptions& options) {
// UDP sockets are not connected - this method should never be called.
NOTREACHED();
return EWOULDBLOCK;
@ -259,8 +259,8 @@ int UdpPacketSocket::Send(const void* data, size_t data_size,
int UdpPacketSocket::SendTo(const void* data,
size_t data_size,
const rtc::SocketAddress& address,
const rtc::PacketOptions& options) {
const talk_base::SocketAddress& address,
const talk_base::PacketOptions& options) {
if (state_ != STATE_BOUND) {
// TODO(sergeyu): StunPort may try to send stun request before we
// are bound. Fix that problem and change this to DCHECK.
@ -292,16 +292,16 @@ int UdpPacketSocket::Close() {
return 0;
}
rtc::AsyncPacketSocket::State UdpPacketSocket::GetState() const {
talk_base::AsyncPacketSocket::State UdpPacketSocket::GetState() const {
return state_;
}
int UdpPacketSocket::GetOption(rtc::Socket::Option opt, int* value) {
int UdpPacketSocket::GetOption(talk_base::Socket::Option opt, int* value) {
// Options are not supported for Pepper UDP sockets.
return -1;
}
int UdpPacketSocket::SetOption(rtc::Socket::Option opt, int value) {
int UdpPacketSocket::SetOption(talk_base::Socket::Option opt, int value) {
// Options are not supported for Pepper UDP sockets.
return -1;
}
@ -385,10 +385,10 @@ void UdpPacketSocket::OnReadCompleted(int result, pp::NetAddress address) {
void UdpPacketSocket::HandleReadResult(int result, pp::NetAddress address) {
if (result > 0) {
rtc::SocketAddress socket_address;
talk_base::SocketAddress socket_address;
PpNetAddressToSocketAddress(address, &socket_address);
SignalReadPacket(this, &receive_buffer_[0], result, socket_address,
rtc::CreatePacketTime(0));
talk_base::CreatePacketTime(0));
} else if (result != PP_ERROR_ABORTED) {
LOG(ERROR) << "Received error when reading from UDP socket: " << result;
}
@ -404,8 +404,8 @@ PepperPacketSocketFactory::PepperPacketSocketFactory(
PepperPacketSocketFactory::~PepperPacketSocketFactory() {
}
rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateUdpSocket(
const rtc::SocketAddress& local_address,
talk_base::AsyncPacketSocket* PepperPacketSocketFactory::CreateUdpSocket(
const talk_base::SocketAddress& local_address,
int min_port,
int max_port) {
scoped_ptr<UdpPacketSocket> result(new UdpPacketSocket(pp_instance_));
@ -414,8 +414,8 @@ rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateUdpSocket(
return result.release();
}
rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateServerTcpSocket(
const rtc::SocketAddress& local_address,
talk_base::AsyncPacketSocket* PepperPacketSocketFactory::CreateServerTcpSocket(
const talk_base::SocketAddress& local_address,
int min_port,
int max_port,
int opts) {
@ -424,10 +424,10 @@ rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateServerTcpSocket(
return NULL;
}
rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateClientTcpSocket(
const rtc::SocketAddress& local_address,
const rtc::SocketAddress& remote_address,
const rtc::ProxyInfo& proxy_info,
talk_base::AsyncPacketSocket* PepperPacketSocketFactory::CreateClientTcpSocket(
const talk_base::SocketAddress& local_address,
const talk_base::SocketAddress& remote_address,
const talk_base::ProxyInfo& proxy_info,
const std::string& user_agent,
int opts) {
// We don't use TCP sockets for remoting connections.
@ -435,7 +435,7 @@ rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateClientTcpSocket(
return NULL;
}
rtc::AsyncResolverInterface*
talk_base::AsyncResolverInterface*
PepperPacketSocketFactory::CreateAsyncResolver() {
NOTREACHED();
return NULL;

@ -11,26 +11,26 @@
namespace remoting {
class PepperPacketSocketFactory : public rtc::PacketSocketFactory {
class PepperPacketSocketFactory : public talk_base::PacketSocketFactory {
public:
explicit PepperPacketSocketFactory(const pp::InstanceHandle& instance);
virtual ~PepperPacketSocketFactory();
virtual rtc::AsyncPacketSocket* CreateUdpSocket(
const rtc::SocketAddress& local_address,
virtual talk_base::AsyncPacketSocket* CreateUdpSocket(
const talk_base::SocketAddress& local_address,
int min_port, int max_port) OVERRIDE;
virtual rtc::AsyncPacketSocket* CreateServerTcpSocket(
const rtc::SocketAddress& local_address,
virtual talk_base::AsyncPacketSocket* CreateServerTcpSocket(
const talk_base::SocketAddress& local_address,
int min_port,
int max_port,
int opts) OVERRIDE;
virtual rtc::AsyncPacketSocket* CreateClientTcpSocket(
const rtc::SocketAddress& local_address,
const rtc::SocketAddress& remote_address,
const rtc::ProxyInfo& proxy_info,
virtual talk_base::AsyncPacketSocket* CreateClientTcpSocket(
const talk_base::SocketAddress& local_address,
const talk_base::SocketAddress& remote_address,
const talk_base::ProxyInfo& proxy_info,
const std::string& user_agent,
int opts) OVERRIDE;
virtual rtc::AsyncResolverInterface* CreateAsyncResolver() OVERRIDE;
virtual talk_base::AsyncResolverInterface* CreateAsyncResolver() OVERRIDE;
private:
const pp::InstanceHandle pp_instance_;

@ -35,7 +35,7 @@ class PepperPortAllocatorSession
int component,
const std::string& ice_username_fragment,
const std::string& ice_password,
const std::vector<rtc::SocketAddress>& stun_hosts,
const std::vector<talk_base::SocketAddress>& stun_hosts,
const std::vector<std::string>& relay_hosts,
const std::string& relay_token,
const pp::InstanceHandle& instance);
@ -57,7 +57,7 @@ class PepperPortAllocatorSession
pp::InstanceHandle instance_;
pp::HostResolver stun_address_resolver_;
rtc::SocketAddress stun_address_;
talk_base::SocketAddress stun_address_;
int stun_port_;
scoped_ptr<pp::URLLoader> relay_url_loader_;
@ -75,7 +75,7 @@ PepperPortAllocatorSession::PepperPortAllocatorSession(
int component,
const std::string& ice_username_fragment,
const std::string& ice_password,
const std::vector<rtc::SocketAddress>& stun_hosts,
const std::vector<talk_base::SocketAddress>& stun_hosts,
const std::vector<std::string>& relay_hosts,
const std::string& relay_token,
const pp::InstanceHandle& instance)
@ -132,7 +132,7 @@ void PepperPortAllocatorSession::GetPortConfigurations() {
// Add an empty configuration synchronously, so a local connection
// can be started immediately.
ConfigReady(new cricket::PortConfiguration(
rtc::SocketAddress(), std::string(), std::string()));
talk_base::SocketAddress(), std::string(), std::string()));
ResolveStunServerAddress();
TryCreateRelaySession();
@ -293,9 +293,9 @@ void PepperPortAllocatorSession::OnResponseBodyRead(int32_t result) {
// static
scoped_ptr<PepperPortAllocator> PepperPortAllocator::Create(
const pp::InstanceHandle& instance) {
scoped_ptr<rtc::NetworkManager> network_manager(
scoped_ptr<talk_base::NetworkManager> network_manager(
new PepperNetworkManager(instance));
scoped_ptr<rtc::PacketSocketFactory> socket_factory(
scoped_ptr<talk_base::PacketSocketFactory> socket_factory(
new PepperPacketSocketFactory(instance));
scoped_ptr<PepperPortAllocator> result(new PepperPortAllocator(
instance, network_manager.Pass(), socket_factory.Pass()));
@ -304,8 +304,8 @@ scoped_ptr<PepperPortAllocator> PepperPortAllocator::Create(
PepperPortAllocator::PepperPortAllocator(
const pp::InstanceHandle& instance,
scoped_ptr<rtc::NetworkManager> network_manager,
scoped_ptr<rtc::PacketSocketFactory> socket_factory)
scoped_ptr<talk_base::NetworkManager> network_manager,
scoped_ptr<talk_base::PacketSocketFactory> socket_factory)
: HttpPortAllocatorBase(network_manager.get(),
socket_factory.get(),
std::string()),

@ -37,12 +37,12 @@ class PepperPortAllocator : public cricket::HttpPortAllocatorBase {
private:
PepperPortAllocator(
const pp::InstanceHandle& instance,
scoped_ptr<rtc::NetworkManager> network_manager,
scoped_ptr<rtc::PacketSocketFactory> socket_factory);
scoped_ptr<talk_base::NetworkManager> network_manager,
scoped_ptr<talk_base::PacketSocketFactory> socket_factory);
pp::InstanceHandle instance_;
scoped_ptr<rtc::NetworkManager> network_manager_;
scoped_ptr<rtc::PacketSocketFactory> socket_factory_;
scoped_ptr<talk_base::NetworkManager> network_manager_;
scoped_ptr<talk_base::PacketSocketFactory> socket_factory_;
DISALLOW_COPY_AND_ASSIGN(PepperPortAllocator);
};

@ -9,13 +9,13 @@
#include "base/sys_byteorder.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/net_address.h"
#include "third_party/webrtc/base/socketaddress.h"
#include "third_party/libjingle/source/talk/base/socketaddress.h"
namespace remoting {
bool SocketAddressToPpNetAddressWithPort(
const pp::InstanceHandle& instance,
const rtc::SocketAddress& address,
const talk_base::SocketAddress& address,
pp::NetAddress* pp_address,
uint16_t port) {
switch (address.ipaddr().family()) {
@ -43,7 +43,7 @@ bool SocketAddressToPpNetAddressWithPort(
}
bool SocketAddressToPpNetAddress(const pp::InstanceHandle& instance,
const rtc::SocketAddress& address,
const talk_base::SocketAddress& address,
pp::NetAddress* pp_net_address) {
return SocketAddressToPpNetAddressWithPort(instance,
address,
@ -52,12 +52,12 @@ bool SocketAddressToPpNetAddress(const pp::InstanceHandle& instance,
}
void PpNetAddressToSocketAddress(const pp::NetAddress& pp_net_address,
rtc::SocketAddress* address) {
talk_base::SocketAddress* address) {
switch (pp_net_address.GetFamily()) {
case PP_NETADDRESS_FAMILY_IPV4: {
PP_NetAddress_IPv4 ipv4_addr;
CHECK(pp_net_address.DescribeAsIPv4Address(&ipv4_addr));
address->SetIP(rtc::IPAddress(
address->SetIP(talk_base::IPAddress(
bit_cast<in_addr>(ipv4_addr.addr)));
address->SetPort(base::NetToHost16(ipv4_addr.port));
return;
@ -65,7 +65,7 @@ void PpNetAddressToSocketAddress(const pp::NetAddress& pp_net_address,
case PP_NETADDRESS_FAMILY_IPV6: {
PP_NetAddress_IPv6 ipv6_addr;
CHECK(pp_net_address.DescribeAsIPv6Address(&ipv6_addr));
address->SetIP(rtc::IPAddress(
address->SetIP(talk_base::IPAddress(
bit_cast<in6_addr>(ipv6_addr.addr)));
address->SetPort(base::NetToHost16(ipv6_addr.port));
return;

@ -14,7 +14,7 @@ class InstanceHandle;
class NetAddress;
}
namespace rtc {
namespace talk_base {
class SocketAddress;
}
@ -23,14 +23,14 @@ namespace remoting {
// Helpers to convert between different socket address representations.
bool SocketAddressToPpNetAddressWithPort(
const pp::InstanceHandle& instance,
const rtc::SocketAddress& address,
const talk_base::SocketAddress& address,
pp::NetAddress* pp_net_address,
uint16_t port);
bool SocketAddressToPpNetAddress(const pp::InstanceHandle& instance,
const rtc::SocketAddress& address,
const talk_base::SocketAddress& address,
pp::NetAddress* pp_net_address);
void PpNetAddressToSocketAddress(const pp::NetAddress& pp_net_address,
rtc::SocketAddress* address);
talk_base::SocketAddress* address);
} // namespace remoting

@ -20,12 +20,12 @@ ChromiumPortAllocatorFactory::ChromiumPortAllocatorFactory(
ChromiumPortAllocatorFactory::~ChromiumPortAllocatorFactory() {}
rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface>
talk_base::scoped_refptr<webrtc::PortAllocatorFactoryInterface>
ChromiumPortAllocatorFactory::Create(
const protocol::NetworkSettings& network_settings,
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) {
rtc::RefCountedObject<ChromiumPortAllocatorFactory>* allocator_factory =
new rtc::RefCountedObject<ChromiumPortAllocatorFactory>(
talk_base::RefCountedObject<ChromiumPortAllocatorFactory>* allocator_factory =
new talk_base::RefCountedObject<ChromiumPortAllocatorFactory>(
network_settings, url_request_context_getter);
return allocator_factory;
}
@ -37,7 +37,7 @@ cricket::PortAllocator* ChromiumPortAllocatorFactory::CreatePortAllocator(
protocol::ChromiumPortAllocator::Create(url_request_context_getter_,
network_settings_));
std::vector<rtc::SocketAddress> stun_hosts;
std::vector<talk_base::SocketAddress> stun_hosts;
typedef std::vector<StunConfiguration>::const_iterator StunIt;
for (StunIt stun_it = stun_servers.begin(); stun_it != stun_servers.end();
++stun_it) {

@ -21,7 +21,7 @@ struct NetworkSettings;
class ChromiumPortAllocatorFactory
: public webrtc::PortAllocatorFactoryInterface {
public:
static rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface> Create(
static talk_base::scoped_refptr<webrtc::PortAllocatorFactoryInterface> Create(
const protocol::NetworkSettings& network_settings,
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter);

@ -8,6 +8,5 @@ include_rules = [
"+remoting/codec",
"+remoting/signaling",
"+third_party/libjingle",
"+third_party/webrtc",
"+third_party/protobuf/src",
]

@ -30,7 +30,7 @@ class ChromiumPortAllocatorSession
int component,
const std::string& ice_username_fragment,
const std::string& ice_password,
const std::vector<rtc::SocketAddress>& stun_hosts,
const std::vector<talk_base::SocketAddress>& stun_hosts,
const std::vector<std::string>& relay_hosts,
const std::string& relay,
const scoped_refptr<net::URLRequestContextGetter>& url_context);
@ -56,7 +56,7 @@ ChromiumPortAllocatorSession::ChromiumPortAllocatorSession(
int component,
const std::string& ice_username_fragment,
const std::string& ice_password,
const std::vector<rtc::SocketAddress>& stun_hosts,
const std::vector<talk_base::SocketAddress>& stun_hosts,
const std::vector<std::string>& relay_hosts,
const std::string& relay,
const scoped_refptr<net::URLRequestContextGetter>& url_context)
@ -133,9 +133,9 @@ void ChromiumPortAllocatorSession::OnURLFetchComplete(
scoped_ptr<ChromiumPortAllocator> ChromiumPortAllocator::Create(
const scoped_refptr<net::URLRequestContextGetter>& url_context,
const NetworkSettings& network_settings) {
scoped_ptr<rtc::NetworkManager> network_manager(
new rtc::BasicNetworkManager());
scoped_ptr<rtc::PacketSocketFactory> socket_factory(
scoped_ptr<talk_base::NetworkManager> network_manager(
new talk_base::BasicNetworkManager());
scoped_ptr<talk_base::PacketSocketFactory> socket_factory(
new ChromiumPacketSocketFactory());
scoped_ptr<ChromiumPortAllocator> result(
new ChromiumPortAllocator(url_context, network_manager.Pass(),
@ -164,8 +164,8 @@ scoped_ptr<ChromiumPortAllocator> ChromiumPortAllocator::Create(
ChromiumPortAllocator::ChromiumPortAllocator(
const scoped_refptr<net::URLRequestContextGetter>& url_context,
scoped_ptr<rtc::NetworkManager> network_manager,
scoped_ptr<rtc::PacketSocketFactory> socket_factory)
scoped_ptr<talk_base::NetworkManager> network_manager,
scoped_ptr<talk_base::PacketSocketFactory> socket_factory)
: HttpPortAllocatorBase(network_manager.get(),
socket_factory.get(),
std::string()),

@ -41,12 +41,12 @@ class ChromiumPortAllocator : public cricket::HttpPortAllocatorBase {
private:
ChromiumPortAllocator(
const scoped_refptr<net::URLRequestContextGetter>& url_context,
scoped_ptr<rtc::NetworkManager> network_manager,
scoped_ptr<rtc::PacketSocketFactory> socket_factory);
scoped_ptr<talk_base::NetworkManager> network_manager,
scoped_ptr<talk_base::PacketSocketFactory> socket_factory);
scoped_refptr<net::URLRequestContextGetter> url_context_;
scoped_ptr<rtc::NetworkManager> network_manager_;
scoped_ptr<rtc::PacketSocketFactory> socket_factory_;
scoped_ptr<talk_base::NetworkManager> network_manager_;
scoped_ptr<talk_base::PacketSocketFactory> socket_factory_;
DISALLOW_COPY_AND_ASSIGN(ChromiumPortAllocator);
};

Some files were not shown because too many files have changed in this diff Show More