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 #ifndef JINGLE_GLUE_PSEUDOTCP_ADAPTER_H_ | 5 #ifndef JINGLE_GLUE_PSEUDOTCP_ADAPTER_H_ |
6 #define JINGLE_GLUE_PSEUDOTCP_ADAPTER_H_ | 6 #define JINGLE_GLUE_PSEUDOTCP_ADAPTER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/threading/non_thread_safe.h" | 12 #include "base/threading/non_thread_safe.h" |
13 #include "net/base/net_log.h" | 13 #include "net/base/net_log.h" |
14 #include "net/socket/stream_socket.h" | 14 #include "net/socket/stream_socket.h" |
15 #include "third_party/libjingle/source/talk/p2p/base/pseudotcp.h" | 15 #include "third_party/webrtc/p2p/base/pseudotcp.h" |
16 | 16 |
17 namespace jingle_glue { | 17 namespace jingle_glue { |
18 | 18 |
19 // PseudoTcpAdapter adapts a connectionless net::Socket to a connection- | 19 // PseudoTcpAdapter adapts a connectionless net::Socket to a connection- |
20 // oriented net::StreamSocket using PseudoTcp. Because net::StreamSockets | 20 // oriented net::StreamSocket using PseudoTcp. Because net::StreamSockets |
21 // can be deleted during callbacks, while PseudoTcp cannot, the core of the | 21 // can be deleted during callbacks, while PseudoTcp cannot, the core of the |
22 // PseudoTcpAdapter is reference counted, with a reference held by the | 22 // PseudoTcpAdapter is reference counted, with a reference held by the |
23 // adapter, and an additional reference held on the stack during callbacks. | 23 // adapter, and an additional reference held on the stack during callbacks. |
24 class PseudoTcpAdapter : public net::StreamSocket, base::NonThreadSafe { | 24 class PseudoTcpAdapter : public net::StreamSocket, base::NonThreadSafe { |
25 public: | 25 public: |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 scoped_refptr<Core> core_; | 84 scoped_refptr<Core> core_; |
85 | 85 |
86 net::BoundNetLog net_log_; | 86 net::BoundNetLog net_log_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(PseudoTcpAdapter); | 88 DISALLOW_COPY_AND_ASSIGN(PseudoTcpAdapter); |
89 }; | 89 }; |
90 | 90 |
91 } // namespace jingle_glue | 91 } // namespace jingle_glue |
92 | 92 |
93 #endif // JINGLE_GLUE_PSEUDOTCP_ADAPTER_H_ | 93 #endif // JINGLE_GLUE_PSEUDOTCP_ADAPTER_H_ |
OLD | NEW |