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

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

Issue 24364005: Update webrtc to r4819. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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/asyncsocket.h" 10 #include "third_party/libjingle/source/talk/base/asyncsocket.h"
(...skipping 15 matching lines...) Expand all
26 talk_base::SocketAddress FakeUDPPacketSocket::GetLocalAddress() const { 26 talk_base::SocketAddress FakeUDPPacketSocket::GetLocalAddress() const {
27 DCHECK(CalledOnValidThread()); 27 DCHECK(CalledOnValidThread());
28 return local_address_; 28 return local_address_;
29 } 29 }
30 30
31 talk_base::SocketAddress FakeUDPPacketSocket::GetRemoteAddress() const { 31 talk_base::SocketAddress FakeUDPPacketSocket::GetRemoteAddress() const {
32 DCHECK(CalledOnValidThread()); 32 DCHECK(CalledOnValidThread());
33 return remote_address_; 33 return remote_address_;
34 } 34 }
35 35
36 int FakeUDPPacketSocket::Send(const void *data, size_t data_size) { 36 int FakeUDPPacketSocket::Send(const void *data, size_t data_size,
37 talk_base::DiffServCodePoint dscp) {
37 DCHECK(CalledOnValidThread()); 38 DCHECK(CalledOnValidThread());
38 return SendTo(data, data_size, remote_address_); 39 return SendTo(data, data_size, remote_address_, dscp);
39 } 40 }
40 41
41 int FakeUDPPacketSocket::SendTo(const void *data, size_t data_size, 42 int FakeUDPPacketSocket::SendTo(const void *data, size_t data_size,
42 const talk_base::SocketAddress& address) { 43 const talk_base::SocketAddress& address,
44 talk_base::DiffServCodePoint /*dscp*/) {
Sergey Ulanov 2013/09/23 22:32:36 no need to comment dscp
Mallinath (Gone from Chromium) 2013/09/23 22:38:14 Done.
43 DCHECK(CalledOnValidThread()); 45 DCHECK(CalledOnValidThread());
44 46
45 if (state_ == IS_CLOSED) { 47 if (state_ == IS_CLOSED) {
46 return ENOTCONN; 48 return ENOTCONN;
47 } 49 }
48 50
49 net::IPEndPoint destination; 51 net::IPEndPoint destination;
50 if (!SocketAddressToIPEndPoint(address, &destination)) { 52 if (!SocketAddressToIPEndPoint(address, &destination)) {
51 return EINVAL; 53 return EINVAL;
52 } 54 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 const talk_base::SocketAddress& local_address, 188 const talk_base::SocketAddress& local_address,
187 const talk_base::SocketAddress& remote_address, 189 const talk_base::SocketAddress& remote_address,
188 const talk_base::ProxyInfo& proxy_info, const std::string& user_agent, 190 const talk_base::ProxyInfo& proxy_info, const std::string& user_agent,
189 int opts) { 191 int opts) {
190 // TODO(sergeyu): Implement fake TCP sockets. 192 // TODO(sergeyu): Implement fake TCP sockets.
191 NOTIMPLEMENTED(); 193 NOTIMPLEMENTED();
192 return NULL; 194 return NULL;
193 } 195 }
194 196
195 } // namespace jingle_glue 197 } // namespace jingle_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698