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

Unified Diff: net/tools/quic/quic_simple_client_bin.cc

Issue 1025133002: Revert of Make the simple QUIC client able to resolve hosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_client_bin.cc ('k') | net/tools/quic/synchronous_host_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_simple_client_bin.cc
diff --git a/net/tools/quic/quic_simple_client_bin.cc b/net/tools/quic/quic_simple_client_bin.cc
index 396009290943db575988b4d270cd3ec1687bdb22..33f3e997d52ddcccbaa5e1a55dbb0008b3055917 100644
--- a/net/tools/quic/quic_simple_client_bin.cc
+++ b/net/tools/quic/quic_simple_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/http_request_info.h"
@@ -59,7 +57,6 @@
#include "net/quic/quic_utils.h"
#include "net/spdy/spdy_http_utils.h"
#include "net/tools/quic/quic_simple_client.h"
-#include "net/tools/quic/synchronous_host_resolver.h"
#include "url/gurl.h"
using base::StringPiece;
@@ -173,18 +170,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);
« no previous file with comments | « net/tools/quic/quic_client_bin.cc ('k') | net/tools/quic/synchronous_host_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698