Index: net/tools/quic/quic_client_bin.cc |
diff --git a/net/tools/quic/quic_client_bin.cc b/net/tools/quic/quic_client_bin.cc |
index 752ccd8cd9ac49b5b7d67fe9056b03b62b3f5888..259111f8782dd6e2e94c74c3c35d5238c24fe0cb 100644 |
--- a/net/tools/quic/quic_client_bin.cc |
+++ b/net/tools/quic/quic_client_bin.cc |
@@ -47,8 +47,6 @@ |
#include "base/strings/string_split.h" |
#include "base/strings/string_util.h" |
#include "net/base/ip_endpoint.h" |
-#include "net/base/net_errors.h" |
-#include "net/base/net_log.h" |
#include "net/base/privacy_mode.h" |
#include "net/cert/cert_verifier.h" |
#include "net/http/transport_security_state.h" |
@@ -59,7 +57,6 @@ |
#include "net/tools/epoll_server/epoll_server.h" |
#include "net/tools/quic/quic_client.h" |
#include "net/tools/quic/spdy_utils.h" |
-#include "net/tools/quic/synchronous_host_resolver.h" |
#include "url/gurl.h" |
using base::StringPiece; |
@@ -172,18 +169,14 @@ |
// protocol is required in the URL. |
GURL url(urls[0]); |
string host = FLAGS_host; |
+ // TODO(rtenneti): get ip_addr from hostname by doing host resolution. |
if (host.empty()) { |
- host = url.host(); |
+ LOG(ERROR) << "--host must be specified\n"; |
+ return 1; |
} |
if (!net::ParseIPLiteralToNumber(host, &ip_addr)) { |
- net::AddressList addresses; |
- int rv = net::tools::SynchronousHostResolver::Resolve(host, &addresses); |
- if (rv != net::OK) { |
- LOG(ERROR) << "Unable to resolve '" << host << "' : " |
- << net::ErrorToString(rv); |
- return 1; |
- } |
- ip_addr = addresses[0].address(); |
+ LOG(ERROR) << "--host could not be parsed as an IP address\n"; |
+ return 1; |
} |
string host_port = net::IPAddressToStringWithPort(ip_addr, FLAGS_port); |