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

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

Issue 5386001: Cache certificate verification results in memory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add unit tests. Ready for review. Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/tcp_client_socket_pool.h" 5 #include "net/socket/tcp_client_socket_pool.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "net/base/mock_host_resolver.h" 10 #include "net/base/mock_host_resolver.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 virtual void Disconnect() {} 144 virtual void Disconnect() {}
145 145
146 virtual bool IsConnected() const { 146 virtual bool IsConnected() const {
147 return is_connected_; 147 return is_connected_;
148 } 148 }
149 virtual bool IsConnectedAndIdle() const { 149 virtual bool IsConnectedAndIdle() const {
150 return is_connected_; 150 return is_connected_;
151 } 151 }
152 virtual int GetPeerAddress(AddressList* address) const{ 152 virtual int GetPeerAddress(AddressList* address) const {
153 return ERR_UNEXPECTED; 153 return ERR_UNEXPECTED;
154 } 154 }
155 virtual const BoundNetLog& NetLog() const { 155 virtual const BoundNetLog& NetLog() const {
156 return net_log_; 156 return net_log_;
157 } 157 }
158 158
159 virtual void SetSubresourceSpeculation() {} 159 virtual void SetSubresourceSpeculation() {}
160 virtual void SetOmniboxSpeculation() {} 160 virtual void SetOmniboxSpeculation() {}
161 virtual bool WasEverUsed() const { return false; } 161 virtual bool WasEverUsed() const { return false; }
162 virtual bool UsingTCPFastOpen() const { return false; } 162 virtual bool UsingTCPFastOpen() const { return false; }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 NOTREACHED(); 244 NOTREACHED();
245 return new MockClientSocket(); 245 return new MockClientSocket();
246 } 246 }
247 } 247 }
248 248
249 virtual SSLClientSocket* CreateSSLClientSocket( 249 virtual SSLClientSocket* CreateSSLClientSocket(
250 ClientSocketHandle* transport_socket, 250 ClientSocketHandle* transport_socket,
251 const HostPortPair& host_and_port, 251 const HostPortPair& host_and_port,
252 const SSLConfig& ssl_config, 252 const SSLConfig& ssl_config,
253 SSLHostInfo* ssl_host_info, 253 SSLHostInfo* ssl_host_info,
254 CertVerifier* cert_verifier,
254 DnsCertProvenanceChecker* dns_cert_checker) { 255 DnsCertProvenanceChecker* dns_cert_checker) {
255 NOTIMPLEMENTED(); 256 NOTIMPLEMENTED();
256 delete ssl_host_info; 257 delete ssl_host_info;
257 return NULL; 258 return NULL;
258 } 259 }
259 260
260 int allocation_count() const { return allocation_count_; } 261 int allocation_count() const { return allocation_count_; }
261 262
262 // Set the default ClientSocketType. 263 // Set the default ClientSocketType.
263 void set_client_socket_type(ClientSocketType type) { 264 void set_client_socket_type(ClientSocketType type) {
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 EXPECT_FALSE(handle.socket()); 902 EXPECT_FALSE(handle.socket());
902 handle.Reset(); 903 handle.Reset();
903 904
904 // Reset for the next case. 905 // Reset for the next case.
905 host_resolver_->set_synchronous_mode(false); 906 host_resolver_->set_synchronous_mode(false);
906 } 907 }
907 908
908 } // namespace 909 } // namespace
909 910
910 } // namespace net 911 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698