| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 189 } |
| 190 | 190 |
| 191 bool TestServer::GetAddressList(AddressList* address_list) const { | 191 bool TestServer::GetAddressList(AddressList* address_list) const { |
| 192 DCHECK(address_list); | 192 DCHECK(address_list); |
| 193 | 193 |
| 194 scoped_ptr<HostResolver> resolver( | 194 scoped_ptr<HostResolver> resolver( |
| 195 CreateSystemHostResolver(HostResolver::kDefaultParallelism, | 195 CreateSystemHostResolver(HostResolver::kDefaultParallelism, |
| 196 HostResolver::kDefaultRetryAttempts, | 196 HostResolver::kDefaultRetryAttempts, |
| 197 NULL)); | 197 NULL)); |
| 198 HostResolver::RequestInfo info(host_port_pair_); | 198 HostResolver::RequestInfo info(host_port_pair_); |
| 199 TestOldCompletionCallback callback; | 199 TestCompletionCallback callback; |
| 200 int rv = resolver->Resolve(info, address_list, &callback, NULL, | 200 int rv = resolver->Resolve(info, address_list, callback.callback(), NULL, |
| 201 BoundNetLog()); | 201 BoundNetLog()); |
| 202 if (rv == ERR_IO_PENDING) | 202 if (rv == ERR_IO_PENDING) |
| 203 rv = callback.WaitForResult(); | 203 rv = callback.WaitForResult(); |
| 204 if (rv != net::OK) { | 204 if (rv != net::OK) { |
| 205 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host(); | 205 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host(); |
| 206 return false; | 206 return false; |
| 207 } | 207 } |
| 208 return true; | 208 return true; |
| 209 } | 209 } |
| 210 | 210 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES256) | 408 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES256) |
| 409 command_line->AppendArg(kBulkCipherSwitch + "=aes256"); | 409 command_line->AppendArg(kBulkCipherSwitch + "=aes256"); |
| 410 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_3DES) | 410 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_3DES) |
| 411 command_line->AppendArg(kBulkCipherSwitch + "=3des"); | 411 command_line->AppendArg(kBulkCipherSwitch + "=3des"); |
| 412 } | 412 } |
| 413 | 413 |
| 414 return true; | 414 return true; |
| 415 } | 415 } |
| 416 | 416 |
| 417 } // namespace net | 417 } // namespace net |
| OLD | NEW |