OLD | NEW |
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 // hrseolv is a command line utility which runs the HostResolver in the | 5 // hrseolv is a command line utility which runs the HostResolver in the |
6 // Chromium network stack. | 6 // Chromium network stack. |
7 // | 7 // |
8 // The user specifies the hosts to lookup and when to look them up. | 8 // The user specifies the hosts to lookup and when to look them up. |
9 // The hosts must be specified in order. | 9 // The hosts must be specified in order. |
10 // The hosts can be contained in a file or on the command line. If no | 10 // The hosts can be contained in a file or on the command line. If no |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 exit(1); | 444 exit(1); |
445 } | 445 } |
446 } | 446 } |
447 | 447 |
448 net::HostCache* cache = new net::HostCache( | 448 net::HostCache* cache = new net::HostCache( |
449 options.cache_size, | 449 options.cache_size, |
450 base::TimeDelta::FromMilliseconds(options.cache_ttl), | 450 base::TimeDelta::FromMilliseconds(options.cache_ttl), |
451 base::TimeDelta::FromSeconds(0)); | 451 base::TimeDelta::FromSeconds(0)); |
452 | 452 |
453 scoped_refptr<net::HostResolver> host_resolver( | 453 scoped_refptr<net::HostResolver> host_resolver( |
454 new net::HostResolverImpl(NULL, cache, 100u)); | 454 new net::HostResolverImpl(NULL, cache, 100u, NULL)); |
455 ResolverInvoker invoker(host_resolver.get()); | 455 ResolverInvoker invoker(host_resolver.get()); |
456 invoker.ResolveAll(hosts_and_times, options.async); | 456 invoker.ResolveAll(hosts_and_times, options.async); |
457 | 457 |
458 CommandLine::Reset(); | 458 CommandLine::Reset(); |
459 return 0; | 459 return 0; |
460 } | 460 } |
OLD | NEW |