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

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

Issue 7011044: Add a command line option to turn off retry attempts to resolve host (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months 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
« no previous file with comments | « net/socket/transport_client_socket_unittest.cc ('k') | net/tools/fetch/fetch_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 default: 185 default:
186 NOTREACHED(); 186 NOTREACHED();
187 } 187 }
188 return std::string(); 188 return std::string();
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, NULL)); 195 CreateSystemHostResolver(HostResolver::kDefaultParallelism,
196 HostResolver::kDefaultRetryAttempts,
197 NULL));
196 HostResolver::RequestInfo info(host_port_pair_); 198 HostResolver::RequestInfo info(host_port_pair_);
197 int rv = resolver->Resolve(info, address_list, NULL, NULL, BoundNetLog()); 199 int rv = resolver->Resolve(info, address_list, NULL, NULL, BoundNetLog());
198 if (rv != net::OK) { 200 if (rv != net::OK) {
199 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host(); 201 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host();
200 return false; 202 return false;
201 } 203 }
202 return true; 204 return true;
203 } 205 }
204 206
205 GURL TestServer::GetURL(const std::string& path) const { 207 GURL TestServer::GetURL(const std::string& path) const {
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES256) 393 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES256)
392 command_line->AppendArg(kBulkCipherSwitch + "=aes256"); 394 command_line->AppendArg(kBulkCipherSwitch + "=aes256");
393 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_3DES) 395 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_3DES)
394 command_line->AppendArg(kBulkCipherSwitch + "=3des"); 396 command_line->AppendArg(kBulkCipherSwitch + "=3des");
395 } 397 }
396 398
397 return true; 399 return true;
398 } 400 }
399 401
400 } // namespace net 402 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/transport_client_socket_unittest.cc ('k') | net/tools/fetch/fetch_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698