Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: net/socket/client_socket_factory.cc

Issue 27500004: Listen for new system certificates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Follow review. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698