| OLD | NEW |
| 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/test/base_test_server.h" | 5 #include "net/test/base_test_server.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 case TYPE_UDP_ECHO: | 156 case TYPE_UDP_ECHO: |
| 157 default: | 157 default: |
| 158 NOTREACHED(); | 158 NOTREACHED(); |
| 159 } | 159 } |
| 160 return std::string(); | 160 return std::string(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 bool BaseTestServer::GetAddressList(AddressList* address_list) const { | 163 bool BaseTestServer::GetAddressList(AddressList* address_list) const { |
| 164 DCHECK(address_list); | 164 DCHECK(address_list); |
| 165 | 165 |
| 166 scoped_ptr<HostResolver> resolver( | 166 scoped_ptr<HostResolver> resolver(HostResolver::CreateDefaultResolver(NULL)); |
| 167 CreateSystemHostResolver(HostResolver::kDefaultParallelism, | |
| 168 HostResolver::kDefaultRetryAttempts, | |
| 169 NULL)); | |
| 170 HostResolver::RequestInfo info(host_port_pair_); | 167 HostResolver::RequestInfo info(host_port_pair_); |
| 171 TestCompletionCallback callback; | 168 TestCompletionCallback callback; |
| 172 int rv = resolver->Resolve(info, address_list, callback.callback(), NULL, | 169 int rv = resolver->Resolve(info, address_list, callback.callback(), NULL, |
| 173 BoundNetLog()); | 170 BoundNetLog()); |
| 174 if (rv == ERR_IO_PENDING) | 171 if (rv == ERR_IO_PENDING) |
| 175 rv = callback.WaitForResult(); | 172 rv = callback.WaitForResult(); |
| 176 if (rv != net::OK) { | 173 if (rv != net::OK) { |
| 177 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host(); | 174 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host(); |
| 178 return false; | 175 return false; |
| 179 } | 176 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 arguments->Set("https-record-resume", base::Value::CreateNullValue()); | 380 arguments->Set("https-record-resume", base::Value::CreateNullValue()); |
| 384 if (https_options_.tls_intolerant != HTTPSOptions::TLS_INTOLERANT_NONE) { | 381 if (https_options_.tls_intolerant != HTTPSOptions::TLS_INTOLERANT_NONE) { |
| 385 arguments->Set("tls-intolerant", | 382 arguments->Set("tls-intolerant", |
| 386 base::Value::CreateIntegerValue(https_options_.tls_intolerant)); | 383 base::Value::CreateIntegerValue(https_options_.tls_intolerant)); |
| 387 } | 384 } |
| 388 } | 385 } |
| 389 return true; | 386 return true; |
| 390 } | 387 } |
| 391 | 388 |
| 392 } // namespace net | 389 } // namespace net |
| OLD | NEW |