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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 ClearSSLSessionCache(); | 60 ClearSSLSessionCache(); |
61 } | 61 } |
62 | 62 |
63 virtual void OnCertTrustChanged(const X509Certificate* cert) OVERRIDE { | 63 virtual void OnCertTrustChanged(const X509Certificate* cert) OVERRIDE { |
64 // Per wtc, we actually only need to flush when trust is reduced. | 64 // Per wtc, we actually only need to flush when trust is reduced. |
65 // Always flush now because OnCertTrustChanged does not tell us this. | 65 // Always flush now because OnCertTrustChanged does not tell us this. |
66 // See comments in ClientSocketPoolManager::OnCertTrustChanged. | 66 // See comments in ClientSocketPoolManager::OnCertTrustChanged. |
67 ClearSSLSessionCache(); | 67 ClearSSLSessionCache(); |
68 } | 68 } |
69 | 69 |
| 70 virtual void OnDatabaseChanged() OVERRIDE { |
| 71 // Per wtc, we actually only need to flush when trust is reduced. |
| 72 // Always flush now because OnDatabaseChanged does not tell us this. |
| 73 // See comments in ClientSocketPoolManager::OnDatabaseChanged. |
| 74 ClearSSLSessionCache(); |
| 75 } |
| 76 |
70 virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket( | 77 virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket( |
71 DatagramSocket::BindType bind_type, | 78 DatagramSocket::BindType bind_type, |
72 const RandIntCallback& rand_int_cb, | 79 const RandIntCallback& rand_int_cb, |
73 NetLog* net_log, | 80 NetLog* net_log, |
74 const NetLog::Source& source) OVERRIDE { | 81 const NetLog::Source& source) OVERRIDE { |
75 return scoped_ptr<DatagramClientSocket>( | 82 return scoped_ptr<DatagramClientSocket>( |
76 new UDPClientSocket(bind_type, rand_int_cb, net_log, source)); | 83 new UDPClientSocket(bind_type, rand_int_cb, net_log, source)); |
77 } | 84 } |
78 | 85 |
79 virtual scoped_ptr<StreamSocket> CreateTransportClientSocket( | 86 virtual scoped_ptr<StreamSocket> CreateTransportClientSocket( |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 g_default_client_socket_factory = LAZY_INSTANCE_INITIALIZER; | 140 g_default_client_socket_factory = LAZY_INSTANCE_INITIALIZER; |
134 | 141 |
135 } // namespace | 142 } // namespace |
136 | 143 |
137 // static | 144 // static |
138 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() { | 145 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() { |
139 return g_default_client_socket_factory.Pointer(); | 146 return g_default_client_socket_factory.Pointer(); |
140 } | 147 } |
141 | 148 |
142 } // namespace net | 149 } // namespace net |
OLD | NEW |