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