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

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

Issue 135373002: Added SSLHostInfo. Storing of server host info to our standard disk cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed wtc's comments Created 6 years, 11 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/transport_client_socket_pool.h" 5 #include "net/socket/transport_client_socket_pool.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/threading/platform_thread.h" 13 #include "base/threading/platform_thread.h"
14 #include "net/base/capturing_net_log.h" 14 #include "net/base/capturing_net_log.h"
15 #include "net/base/ip_endpoint.h" 15 #include "net/base/ip_endpoint.h"
16 #include "net/base/load_timing_info.h" 16 #include "net/base/load_timing_info.h"
17 #include "net/base/load_timing_info_test_util.h" 17 #include "net/base/load_timing_info_test_util.h"
18 #include "net/base/net_errors.h" 18 #include "net/base/net_errors.h"
19 #include "net/base/net_util.h" 19 #include "net/base/net_util.h"
20 #include "net/base/test_completion_callback.h" 20 #include "net/base/test_completion_callback.h"
21 #include "net/dns/mock_host_resolver.h" 21 #include "net/dns/mock_host_resolver.h"
22 #include "net/socket/client_socket_factory.h" 22 #include "net/socket/client_socket_factory.h"
23 #include "net/socket/client_socket_handle.h" 23 #include "net/socket/client_socket_handle.h"
24 #include "net/socket/client_socket_pool_histograms.h" 24 #include "net/socket/client_socket_pool_histograms.h"
25 #include "net/socket/socket_test_util.h" 25 #include "net/socket/socket_test_util.h"
26 #include "net/socket/ssl_client_socket.h" 26 #include "net/socket/ssl_client_socket.h"
27 #include "net/socket/ssl_host_info.h"
27 #include "net/socket/stream_socket.h" 28 #include "net/socket/stream_socket.h"
28 #include "testing/gtest/include/gtest/gtest.h" 29 #include "testing/gtest/include/gtest/gtest.h"
29 30
30 namespace net { 31 namespace net {
31 32
32 using internal::ClientSocketPoolBaseHelper; 33 using internal::ClientSocketPoolBaseHelper;
33 34
34 namespace { 35 namespace {
35 36
36 const int kMaxSockets = 32; 37 const int kMaxSockets = 32;
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 NOTREACHED(); 397 NOTREACHED();
397 return scoped_ptr<StreamSocket>( 398 return scoped_ptr<StreamSocket>(
398 new MockClientSocket(addresses, net_log_)); 399 new MockClientSocket(addresses, net_log_));
399 } 400 }
400 } 401 }
401 402
402 virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket( 403 virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
403 scoped_ptr<ClientSocketHandle> transport_socket, 404 scoped_ptr<ClientSocketHandle> transport_socket,
404 const HostPortPair& host_and_port, 405 const HostPortPair& host_and_port,
405 const SSLConfig& ssl_config, 406 const SSLConfig& ssl_config,
407 SSLHostInfo* ssl_host_info,
406 const SSLClientSocketContext& context) OVERRIDE { 408 const SSLClientSocketContext& context) OVERRIDE {
407 NOTIMPLEMENTED(); 409 NOTIMPLEMENTED();
410 delete ssl_host_info;
408 return scoped_ptr<SSLClientSocket>(); 411 return scoped_ptr<SSLClientSocket>();
409 } 412 }
410 413
411 virtual void ClearSSLSessionCache() OVERRIDE { 414 virtual void ClearSSLSessionCache() OVERRIDE {
412 NOTIMPLEMENTED(); 415 NOTIMPLEMENTED();
413 } 416 }
414 417
415 int allocation_count() const { return allocation_count_; } 418 int allocation_count() const { return allocation_count_; }
416 419
417 // Set the default ClientSocketType. 420 // Set the default ClientSocketType.
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 EXPECT_TRUE(handle.socket()); 1369 EXPECT_TRUE(handle.socket());
1367 IPEndPoint endpoint; 1370 IPEndPoint endpoint;
1368 handle.socket()->GetLocalAddress(&endpoint); 1371 handle.socket()->GetLocalAddress(&endpoint);
1369 EXPECT_EQ(kIPv4AddressSize, endpoint.address().size()); 1372 EXPECT_EQ(kIPv4AddressSize, endpoint.address().size());
1370 EXPECT_EQ(1, client_socket_factory_.allocation_count()); 1373 EXPECT_EQ(1, client_socket_factory_.allocation_count());
1371 } 1374 }
1372 1375
1373 } // namespace 1376 } // namespace
1374 1377
1375 } // namespace net 1378 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698