| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 case TYPE_UDP_ECHO: | 162 case TYPE_UDP_ECHO: |
| 163 default: | 163 default: |
| 164 NOTREACHED(); | 164 NOTREACHED(); |
| 165 } | 165 } |
| 166 return std::string(); | 166 return std::string(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 bool BaseTestServer::GetAddressList(AddressList* address_list) const { | 169 bool BaseTestServer::GetAddressList(AddressList* address_list) const { |
| 170 DCHECK(address_list); | 170 DCHECK(address_list); |
| 171 | 171 |
| 172 scoped_ptr<HostResolver> resolver( | 172 scoped_ptr<HostResolver> resolver(HostResolver::CreateDefaultResolver(NULL)); |
| 173 CreateSystemHostResolver(HostResolver::kDefaultParallelism, | |
| 174 HostResolver::kDefaultRetryAttempts, | |
| 175 NULL)); | |
| 176 HostResolver::RequestInfo info(host_port_pair_); | 173 HostResolver::RequestInfo info(host_port_pair_); |
| 177 TestCompletionCallback callback; | 174 TestCompletionCallback callback; |
| 178 int rv = resolver->Resolve(info, address_list, callback.callback(), NULL, | 175 int rv = resolver->Resolve(info, address_list, callback.callback(), NULL, |
| 179 BoundNetLog()); | 176 BoundNetLog()); |
| 180 if (rv == ERR_IO_PENDING) | 177 if (rv == ERR_IO_PENDING) |
| 181 rv = callback.WaitForResult(); | 178 rv = callback.WaitForResult(); |
| 182 if (rv != net::OK) { | 179 if (rv != net::OK) { |
| 183 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host(); | 180 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host(); |
| 184 return false; | 181 return false; |
| 185 } | 182 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 arguments->Set("https-record-resume", base::Value::CreateNullValue()); | 386 arguments->Set("https-record-resume", base::Value::CreateNullValue()); |
| 390 if (ssl_options_.tls_intolerant != SSLOptions::TLS_INTOLERANT_NONE) { | 387 if (ssl_options_.tls_intolerant != SSLOptions::TLS_INTOLERANT_NONE) { |
| 391 arguments->Set("tls-intolerant", | 388 arguments->Set("tls-intolerant", |
| 392 base::Value::CreateIntegerValue(ssl_options_.tls_intolerant)); | 389 base::Value::CreateIntegerValue(ssl_options_.tls_intolerant)); |
| 393 } | 390 } |
| 394 } | 391 } |
| 395 return true; | 392 return true; |
| 396 } | 393 } |
| 397 | 394 |
| 398 } // namespace net | 395 } // namespace net |
| OLD | NEW |