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

Side by Side Diff: net/dns/address_sorter_posix_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/dns/address_sorter_posix.h" 5 #include "net/dns/address_sorter_posix.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/net_util.h" 10 #include "net/base/net_util.h"
11 #include "net/base/test_completion_callback.h" 11 #include "net/base/test_completion_callback.h"
12 #include "net/cert/x509_certificate.h"
wtc 2014/01/18 01:02:01 Is it necessary to add this header?
ramant (doing other things) 2014/01/18 01:28:53 ssl_host_info.h did a forward declaration of X509C
12 #include "net/socket/client_socket_factory.h" 13 #include "net/socket/client_socket_factory.h"
13 #include "net/socket/ssl_client_socket.h" 14 #include "net/socket/ssl_client_socket.h"
15 #include "net/socket/ssl_host_info.h"
14 #include "net/socket/stream_socket.h" 16 #include "net/socket/stream_socket.h"
15 #include "net/udp/datagram_client_socket.h" 17 #include "net/udp/datagram_client_socket.h"
16 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
17 19
18 namespace net { 20 namespace net {
19 namespace { 21 namespace {
20 22
21 // Used to map destination address to source address. 23 // Used to map destination address to source address.
22 typedef std::map<IPAddressNumber, IPAddressNumber> AddressMapping; 24 typedef std::map<IPAddressNumber, IPAddressNumber> AddressMapping;
23 25
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 const AddressList&, 105 const AddressList&,
104 NetLog*, 106 NetLog*,
105 const NetLog::Source&) OVERRIDE { 107 const NetLog::Source&) OVERRIDE {
106 NOTIMPLEMENTED(); 108 NOTIMPLEMENTED();
107 return scoped_ptr<StreamSocket>(); 109 return scoped_ptr<StreamSocket>();
108 } 110 }
109 virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket( 111 virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
110 scoped_ptr<ClientSocketHandle>, 112 scoped_ptr<ClientSocketHandle>,
111 const HostPortPair&, 113 const HostPortPair&,
112 const SSLConfig&, 114 const SSLConfig&,
115 SSLHostInfo* ssl_host_info,
113 const SSLClientSocketContext&) OVERRIDE { 116 const SSLClientSocketContext&) OVERRIDE {
114 NOTIMPLEMENTED(); 117 NOTIMPLEMENTED();
118 delete ssl_host_info;
115 return scoped_ptr<SSLClientSocket>(); 119 return scoped_ptr<SSLClientSocket>();
116 } 120 }
117 virtual void ClearSSLSessionCache() OVERRIDE { 121 virtual void ClearSSLSessionCache() OVERRIDE {
118 NOTIMPLEMENTED(); 122 NOTIMPLEMENTED();
119 } 123 }
120 124
121 void AddMapping(const IPAddressNumber& dst, const IPAddressNumber& src) { 125 void AddMapping(const IPAddressNumber& dst, const IPAddressNumber& src) {
122 mapping_[dst] = src; 126 mapping_[dst] = src;
123 } 127 }
124 128
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 AddMapping("4000::1", "4000::10"); // global unicast 322 AddMapping("4000::1", "4000::10"); // global unicast
319 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast 323 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast
320 GetSourceInfo("fe81::20")->deprecated = true; 324 GetSourceInfo("fe81::20")->deprecated = true;
321 const char* addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", "::1", 325 const char* addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", "::1",
322 "8.0.0.1", NULL }; 326 "8.0.0.1", NULL };
323 const int order[] = { 4, 3, 0, 2, 1, -1 }; 327 const int order[] = { 4, 3, 0, 2, 1, -1 };
324 Verify(addresses, order); 328 Verify(addresses, order);
325 } 329 }
326 330
327 } // namespace net 331 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698