| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "remoting/protocol/libjingle_transport_factory.h" | 5 #include "remoting/protocol/libjingle_transport_factory.h" | 
| 6 | 6 | 
| 7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" | 
| 8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" | 
| 9 #include "jingle/glue/channel_socket_adapter.h" | 9 #include "jingle/glue/channel_socket_adapter.h" | 
| 10 #include "jingle/glue/pseudotcp_adapter.h" | 10 #include "jingle/glue/pseudotcp_adapter.h" | 
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 305 | 305 | 
| 306   // This method may be called in response to a libjingle signal, so | 306   // This method may be called in response to a libjingle signal, so | 
| 307   // libjingle objects must be deleted asynchronously. | 307   // libjingle objects must be deleted asynchronously. | 
| 308   if (channel_.get()) { | 308   if (channel_.get()) { | 
| 309     base::ThreadTaskRunnerHandle::Get()->DeleteSoon( | 309     base::ThreadTaskRunnerHandle::Get()->DeleteSoon( | 
| 310         FROM_HERE, channel_.release()); | 310         FROM_HERE, channel_.release()); | 
| 311   } | 311   } | 
| 312 | 312 | 
| 313   authenticator_.reset(); | 313   authenticator_.reset(); | 
| 314 | 314 | 
| 315   NotifyConnected(scoped_ptr<net::StreamSocket>(NULL)); | 315   NotifyConnected(scoped_ptr<net::StreamSocket>()); | 
| 316 } | 316 } | 
| 317 | 317 | 
| 318 }  // namespace | 318 }  // namespace | 
| 319 | 319 | 
| 320 LibjingleTransportFactory::LibjingleTransportFactory( | 320 LibjingleTransportFactory::LibjingleTransportFactory( | 
| 321     scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator, | 321     scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator, | 
| 322     bool incoming_only) | 322     bool incoming_only) | 
| 323     : http_port_allocator_(port_allocator.get()), | 323     : http_port_allocator_(port_allocator.get()), | 
| 324       port_allocator_(port_allocator.Pass()), | 324       port_allocator_(port_allocator.Pass()), | 
| 325       incoming_only_(incoming_only) { | 325       incoming_only_(incoming_only) { | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 372 } | 372 } | 
| 373 | 373 | 
| 374 scoped_ptr<StreamTransport> LibjingleTransportFactory::CreateStreamTransport() { | 374 scoped_ptr<StreamTransport> LibjingleTransportFactory::CreateStreamTransport() { | 
| 375   return scoped_ptr<StreamTransport>( | 375   return scoped_ptr<StreamTransport>( | 
| 376       new LibjingleStreamTransport(port_allocator_.get(), incoming_only_)); | 376       new LibjingleStreamTransport(port_allocator_.get(), incoming_only_)); | 
| 377 } | 377 } | 
| 378 | 378 | 
| 379 scoped_ptr<DatagramTransport> | 379 scoped_ptr<DatagramTransport> | 
| 380 LibjingleTransportFactory::CreateDatagramTransport() { | 380 LibjingleTransportFactory::CreateDatagramTransport() { | 
| 381   NOTIMPLEMENTED(); | 381   NOTIMPLEMENTED(); | 
| 382   return scoped_ptr<DatagramTransport>(NULL); | 382   return scoped_ptr<DatagramTransport>(); | 
| 383 } | 383 } | 
| 384 | 384 | 
| 385 }  // namespace protocol | 385 }  // namespace protocol | 
| 386 }  // namespace remoting | 386 }  // namespace remoting | 
| OLD | NEW | 
|---|