| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_COMMON_NET_NOTIFIER_BASE_SSL_ADAPTER_H_ | 5 #ifndef JINGLE_NOTIFIER_BASE_SSL_ADAPTER_H_ |
| 6 #define CHROME_COMMON_NET_NOTIFIER_BASE_SSL_ADAPTER_H_ | 6 #define JINGLE_NOTIFIER_BASE_SSL_ADAPTER_H_ |
| 7 | 7 |
| 8 namespace talk_base { | 8 namespace talk_base { |
| 9 class AsyncSocket; | 9 class AsyncSocket; |
| 10 class SSLAdapter; | 10 class SSLAdapter; |
| 11 } // namespace talk_base | 11 } // namespace talk_base |
| 12 | 12 |
| 13 namespace notifier { | 13 namespace notifier { |
| 14 | 14 |
| 15 // Wraps the given socket in a platform-dependent SSLAdapter | 15 // Wraps the given socket in a platform-dependent SSLAdapter |
| 16 // implementation. | 16 // implementation. |
| 17 talk_base::SSLAdapter* CreateSSLAdapter(talk_base::AsyncSocket* socket); | 17 talk_base::SSLAdapter* CreateSSLAdapter(talk_base::AsyncSocket* socket); |
| 18 | 18 |
| 19 // Utility template class that overrides CreateSSLAdapter() to use the | 19 // Utility template class that overrides CreateSSLAdapter() to use the |
| 20 // above function. | 20 // above function. |
| 21 template <class SocketFactory> | 21 template <class SocketFactory> |
| 22 class SSLAdapterSocketFactory : public SocketFactory { | 22 class SSLAdapterSocketFactory : public SocketFactory { |
| 23 public: | 23 public: |
| 24 virtual talk_base::SSLAdapter* CreateSSLAdapter( | 24 virtual talk_base::SSLAdapter* CreateSSLAdapter( |
| 25 talk_base::AsyncSocket* socket) { | 25 talk_base::AsyncSocket* socket) { |
| 26 return ::notifier::CreateSSLAdapter(socket); | 26 return ::notifier::CreateSSLAdapter(socket); |
| 27 } | 27 } |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 } // namespace notifier | 30 } // namespace notifier |
| 31 | 31 |
| 32 #endif // CHROME_COMMON_NET_NOTIFIER_BASE_SSL_ADAPTER_H_ | 32 #endif // JINGLE_NOTIFIER_BASE_SSL_ADAPTER_H_ |
| 33 | 33 |
| OLD | NEW |