Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: net/test/test_server.cc

Issue 4216001: Initial support for built-in DNS resolver/cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing files Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 default: 235 default:
236 NOTREACHED(); 236 NOTREACHED();
237 } 237 }
238 return std::string(); 238 return std::string();
239 } 239 }
240 240
241 bool TestServer::GetAddressList(AddressList* address_list) const { 241 bool TestServer::GetAddressList(AddressList* address_list) const {
242 DCHECK(address_list); 242 DCHECK(address_list);
243 243
244 scoped_ptr<HostResolver> resolver( 244 scoped_ptr<HostResolver> resolver(
245 CreateSystemHostResolver(HostResolver::kDefaultParallelism, NULL)); 245 CreateSystemHostResolver(HostResolver::kDefaultParallelism, NULL, NULL));
246 HostResolver::RequestInfo info(host_port_pair_); 246 HostResolver::RequestInfo info(host_port_pair_);
247 int rv = resolver->Resolve(info, address_list, NULL, NULL, BoundNetLog()); 247 int rv = resolver->Resolve(info, address_list, NULL, NULL, BoundNetLog());
248 if (rv != net::OK) { 248 if (rv != net::OK) {
249 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host(); 249 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host();
250 return false; 250 return false;
251 } 251 }
252 return true; 252 return true;
253 } 253 }
254 254
255 GURL TestServer::GetURL(const std::string& path) { 255 GURL TestServer::GetURL(const std::string& path) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES256) 384 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES256)
385 command_line->AppendSwitchASCII(kBulkCipherSwitch, "aes256"); 385 command_line->AppendSwitchASCII(kBulkCipherSwitch, "aes256");
386 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_3DES) 386 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_3DES)
387 command_line->AppendSwitchASCII(kBulkCipherSwitch, "3des"); 387 command_line->AppendSwitchASCII(kBulkCipherSwitch, "3des");
388 } 388 }
389 389
390 return true; 390 return true;
391 } 391 }
392 392
393 } // namespace net 393 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698