OLD | NEW |
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.h" | 8 #include "base/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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 164 } |
165 | 165 |
166 FakeSocketFactory::~FakeSocketFactory() { | 166 FakeSocketFactory::~FakeSocketFactory() { |
167 } | 167 } |
168 | 168 |
169 talk_base::AsyncPacketSocket* FakeSocketFactory::CreateUdpSocket( | 169 talk_base::AsyncPacketSocket* FakeSocketFactory::CreateUdpSocket( |
170 const talk_base::SocketAddress& local_address, int min_port, int max_port) { | 170 const talk_base::SocketAddress& local_address, int min_port, int max_port) { |
171 CHECK_EQ(min_port, 0); | 171 CHECK_EQ(min_port, 0); |
172 CHECK_EQ(max_port, 0); | 172 CHECK_EQ(max_port, 0); |
173 return new FakeUDPPacketSocket( | 173 return new FakeUDPPacketSocket( |
174 socket_manager_, net::IPEndPoint(address_, ++last_allocated_port_)); | 174 socket_manager_.get(), net::IPEndPoint(address_, ++last_allocated_port_)); |
175 } | 175 } |
176 | 176 |
177 talk_base::AsyncPacketSocket* FakeSocketFactory::CreateServerTcpSocket( | 177 talk_base::AsyncPacketSocket* FakeSocketFactory::CreateServerTcpSocket( |
178 const talk_base::SocketAddress& local_address, int min_port, int max_port, | 178 const talk_base::SocketAddress& local_address, int min_port, int max_port, |
179 int opts) { | 179 int opts) { |
180 // TODO(sergeyu): Implement fake TCP sockets. | 180 // TODO(sergeyu): Implement fake TCP sockets. |
181 NOTIMPLEMENTED(); | 181 NOTIMPLEMENTED(); |
182 return NULL; | 182 return NULL; |
183 } | 183 } |
184 | 184 |
185 talk_base::AsyncPacketSocket* FakeSocketFactory::CreateClientTcpSocket( | 185 talk_base::AsyncPacketSocket* FakeSocketFactory::CreateClientTcpSocket( |
186 const talk_base::SocketAddress& local_address, | 186 const talk_base::SocketAddress& local_address, |
187 const talk_base::SocketAddress& remote_address, | 187 const talk_base::SocketAddress& remote_address, |
188 const talk_base::ProxyInfo& proxy_info, const std::string& user_agent, | 188 const talk_base::ProxyInfo& proxy_info, const std::string& user_agent, |
189 int opts) { | 189 int opts) { |
190 // TODO(sergeyu): Implement fake TCP sockets. | 190 // TODO(sergeyu): Implement fake TCP sockets. |
191 NOTIMPLEMENTED(); | 191 NOTIMPLEMENTED(); |
192 return NULL; | 192 return NULL; |
193 } | 193 } |
194 | 194 |
195 } // namespace jingle_glue | 195 } // namespace jingle_glue |
OLD | NEW |