OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // TODO(ajwong): Unfork with |
| 6 // chrome/common/net/notifier/base/ssl_adapter.h |
| 7 |
| 8 #ifndef REMOTING_JINGLE_GLUE_SSL_ADAPTER_H_ |
| 9 #define REMOTING_JINGLE_GLUE_SSL_ADAPTER_H_ |
| 10 |
| 11 namespace talk_base { |
| 12 class AsyncSocket; |
| 13 class SSLAdapter; |
| 14 } // namespace talk_base |
| 15 |
| 16 namespace remoting { |
| 17 |
| 18 // Wraps the given socket in a platform-dependent SSLAdapter |
| 19 // implementation. |
| 20 talk_base::SSLAdapter* CreateSSLAdapter(talk_base::AsyncSocket* socket); |
| 21 |
| 22 // Utility template class that overrides CreateSSLAdapter() to use the |
| 23 // above function. |
| 24 template <class SocketFactory> |
| 25 class SSLAdapterSocketFactory : public SocketFactory { |
| 26 public: |
| 27 virtual talk_base::SSLAdapter* CreateSSLAdapter( |
| 28 talk_base::AsyncSocket* socket) { |
| 29 return ::remoting::CreateSSLAdapter(socket); |
| 30 } |
| 31 }; |
| 32 |
| 33 } // namespace remoting |
| 34 |
| 35 #endif // REMOTING_JINGLE_GLUE_SSL_ADAPTER_H_ |
OLD | NEW |