| 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 "net/socket/client_socket_factory.h" | 5 #include "net/socket/client_socket_factory.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
| 9 #include "base/threading/sequenced_worker_pool.h" | 9 #include "base/threading/sequenced_worker_pool.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 private: | 123 private: |
| 124 scoped_refptr<base::SequencedWorkerPool> worker_pool_; | 124 scoped_refptr<base::SequencedWorkerPool> worker_pool_; |
| 125 scoped_refptr<base::SequencedTaskRunner> nss_thread_task_runner_; | 125 scoped_refptr<base::SequencedTaskRunner> nss_thread_task_runner_; |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 static base::LazyInstance<DefaultClientSocketFactory>::Leaky | 128 static base::LazyInstance<DefaultClientSocketFactory>::Leaky |
| 129 g_default_client_socket_factory = LAZY_INSTANCE_INITIALIZER; | 129 g_default_client_socket_factory = LAZY_INSTANCE_INITIALIZER; |
| 130 | 130 |
| 131 } // namespace | 131 } // namespace |
| 132 | 132 |
| 133 // Deprecated function (http://crbug.com/37810) that takes a StreamSocket. | |
| 134 SSLClientSocket* ClientSocketFactory::CreateSSLClientSocket( | |
| 135 StreamSocket* transport_socket, | |
| 136 const HostPortPair& host_and_port, | |
| 137 const SSLConfig& ssl_config, | |
| 138 const SSLClientSocketContext& context) { | |
| 139 ClientSocketHandle* socket_handle = new ClientSocketHandle(); | |
| 140 socket_handle->set_socket(transport_socket); | |
| 141 return CreateSSLClientSocket(socket_handle, host_and_port, ssl_config, | |
| 142 context); | |
| 143 } | |
| 144 | |
| 145 // static | 133 // static |
| 146 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() { | 134 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() { |
| 147 return g_default_client_socket_factory.Pointer(); | 135 return g_default_client_socket_factory.Pointer(); |
| 148 } | 136 } |
| 149 | 137 |
| 150 } // namespace net | 138 } // namespace net |
| OLD | NEW |