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