OLD | NEW |
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/test/test_server.h" | 5 #include "net/test/test_server.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 default: | 175 default: |
176 NOTREACHED(); | 176 NOTREACHED(); |
177 } | 177 } |
178 return std::string(); | 178 return std::string(); |
179 } | 179 } |
180 | 180 |
181 bool TestServer::GetAddressList(AddressList* address_list) const { | 181 bool TestServer::GetAddressList(AddressList* address_list) const { |
182 DCHECK(address_list); | 182 DCHECK(address_list); |
183 | 183 |
184 scoped_refptr<HostResolver> resolver( | 184 scoped_refptr<HostResolver> resolver( |
185 CreateSystemHostResolver(HostResolver::kDefaultParallelism)); | 185 CreateSystemHostResolver(HostResolver::kDefaultParallelism, NULL)); |
186 HostResolver::RequestInfo info(host_port_pair_.host(), | 186 HostResolver::RequestInfo info(host_port_pair_.host(), |
187 host_port_pair_.port()); | 187 host_port_pair_.port()); |
188 int rv = resolver->Resolve(info, address_list, NULL, NULL, BoundNetLog()); | 188 int rv = resolver->Resolve(info, address_list, NULL, NULL, BoundNetLog()); |
189 if (rv != net::OK) { | 189 if (rv != net::OK) { |
190 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host(); | 190 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host(); |
191 return false; | 191 return false; |
192 } | 192 } |
193 return true; | 193 return true; |
194 } | 194 } |
195 | 195 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 return certificates_dir_.AppendASCII("ok_cert.pem"); | 292 return certificates_dir_.AppendASCII("ok_cert.pem"); |
293 case TYPE_HTTPS_EXPIRED_CERTIFICATE: | 293 case TYPE_HTTPS_EXPIRED_CERTIFICATE: |
294 return certificates_dir_.AppendASCII("expired_cert.pem"); | 294 return certificates_dir_.AppendASCII("expired_cert.pem"); |
295 default: | 295 default: |
296 NOTREACHED(); | 296 NOTREACHED(); |
297 } | 297 } |
298 return FilePath(); | 298 return FilePath(); |
299 } | 299 } |
300 | 300 |
301 } // namespace net | 301 } // namespace net |
OLD | NEW |