Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: jingle/glue/fake_socket_factory.cc

Issue 167893002: Roll webrtc to r5549. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "jingle/glue/fake_socket_factory.h" 5 #include "jingle/glue/fake_socket_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "jingle/glue/utils.h" 9 #include "jingle/glue/utils.h"
10 #include "third_party/libjingle/source/talk/base/asyncpacketsocket.h" 10 #include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
(...skipping 17 matching lines...) Expand all
28 DCHECK(CalledOnValidThread()); 28 DCHECK(CalledOnValidThread());
29 return local_address_; 29 return local_address_;
30 } 30 }
31 31
32 talk_base::SocketAddress FakeUDPPacketSocket::GetRemoteAddress() const { 32 talk_base::SocketAddress FakeUDPPacketSocket::GetRemoteAddress() const {
33 DCHECK(CalledOnValidThread()); 33 DCHECK(CalledOnValidThread());
34 return remote_address_; 34 return remote_address_;
35 } 35 }
36 36
37 int FakeUDPPacketSocket::Send(const void *data, size_t data_size, 37 int FakeUDPPacketSocket::Send(const void *data, size_t data_size,
38 talk_base::DiffServCodePoint dscp) { 38 const talk_base::PacketOptions& options) {
39 DCHECK(CalledOnValidThread()); 39 DCHECK(CalledOnValidThread());
40 return SendTo(data, data_size, remote_address_, dscp); 40 return SendTo(data, data_size, remote_address_, options);
41 } 41 }
42 42
43 int FakeUDPPacketSocket::SendTo(const void *data, size_t data_size, 43 int FakeUDPPacketSocket::SendTo(const void *data, size_t data_size,
44 const talk_base::SocketAddress& address, 44 const talk_base::SocketAddress& address,
45 talk_base::DiffServCodePoint dscp) { 45 const talk_base::PacketOptions& options) {
46 DCHECK(CalledOnValidThread()); 46 DCHECK(CalledOnValidThread());
47 47
48 if (state_ == IS_CLOSED) { 48 if (state_ == IS_CLOSED) {
49 return ENOTCONN; 49 return ENOTCONN;
50 } 50 }
51 51
52 net::IPEndPoint destination; 52 net::IPEndPoint destination;
53 if (!SocketAddressToIPEndPoint(address, &destination)) { 53 if (!SocketAddressToIPEndPoint(address, &destination)) {
54 return EINVAL; 54 return EINVAL;
55 } 55 }
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 const talk_base::SocketAddress& local_address, 190 const talk_base::SocketAddress& local_address,
191 const talk_base::SocketAddress& remote_address, 191 const talk_base::SocketAddress& remote_address,
192 const talk_base::ProxyInfo& proxy_info, const std::string& user_agent, 192 const talk_base::ProxyInfo& proxy_info, const std::string& user_agent,
193 int opts) { 193 int opts) {
194 // TODO(sergeyu): Implement fake TCP sockets. 194 // TODO(sergeyu): Implement fake TCP sockets.
195 NOTIMPLEMENTED(); 195 NOTIMPLEMENTED();
196 return NULL; 196 return NULL;
197 } 197 }
198 198
199 } // namespace jingle_glue 199 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « jingle/glue/fake_socket_factory.h ('k') | remoting/client/plugin/pepper_packet_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698