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

Side by Side Diff: net/socket/ssl_test_util.cc

Issue 3019007: Add a command line flag to change the default number of parallel DNS requests... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address jar's comments Created 10 years, 5 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/ssl_client_socket_unittest.cc ('k') | net/socket/tcp_client_socket_unittest.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) 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/socket/ssl_test_util.h" 5 #include "net/socket/ssl_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 223
224 LOG(INFO) << "Started on port " << port_str; 224 LOG(INFO) << "Started on port " << port_str;
225 return true; 225 return true;
226 } 226 }
227 227
228 bool TestServerLauncher::WaitToStart(const std::string& host_name, int port) { 228 bool TestServerLauncher::WaitToStart(const std::string& host_name, int port) {
229 // Verify that the webserver is actually started. 229 // Verify that the webserver is actually started.
230 // Otherwise tests can fail if they run faster than Python can start. 230 // Otherwise tests can fail if they run faster than Python can start.
231 net::AddressList addr; 231 net::AddressList addr;
232 scoped_refptr<net::HostResolver> resolver(net::CreateSystemHostResolver()); 232 scoped_refptr<net::HostResolver> resolver(
233 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism));
233 net::HostResolver::RequestInfo info(host_name, port); 234 net::HostResolver::RequestInfo info(host_name, port);
234 int rv = resolver->Resolve(info, &addr, NULL, NULL, BoundNetLog()); 235 int rv = resolver->Resolve(info, &addr, NULL, NULL, BoundNetLog());
235 if (rv != net::OK) 236 if (rv != net::OK)
236 return false; 237 return false;
237 238
238 net::TCPPinger pinger(addr); 239 net::TCPPinger pinger(addr);
239 rv = pinger.Ping(base::TimeDelta::FromMilliseconds(connection_timeout_), 240 rv = pinger.Ping(base::TimeDelta::FromMilliseconds(connection_timeout_),
240 connection_attempts_); 241 connection_attempts_);
241 return rv == net::OK; 242 return rv == net::OK;
242 } 243 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 process_info.hProcess)) { 405 process_info.hProcess)) {
405 LOG(ERROR) << "Could not AssignProcessToObject."; 406 LOG(ERROR) << "Could not AssignProcessToObject.";
406 return false; 407 return false;
407 } 408 }
408 } 409 }
409 return true; 410 return true;
410 } 411 }
411 #endif 412 #endif
412 413
413 } // namespace net 414 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | net/socket/tcp_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698