Skip to content
This repository was archived by the owner on Apr 3, 2020. It is now read-only.

Commit ca74cd2

Browse files
pavelfeldmanCommit bot
authored and
Commit bot
committed
Revert of Make the simple QUIC client able to resolve hosts. (patchset #7 id:120001 of https://codereview.chromium.org/1004173004/)
Reason for revert: Build failure: http://build.chromium.org/p/chromium.win/builders/Win%20x64%20Builder%20%28dbg%29/builds/7147/steps/compile/logs/stdio Original issue's description: > Make the simple QUIC client able to resolve hosts. > Implement a SynchronousHostResolver for this purpose. > > Committed: https://crrev.com/acfb2f91085d5291ba1c9a04dbe7aea610b13e33 > Cr-Commit-Position: refs/heads/master@{#321688} [email protected],[email protected] NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1025133002 Cr-Commit-Position: refs/heads/master@{#321702}
1 parent 1372da2 commit ca74cd2

File tree

6 files changed

+10
-165
lines changed

6 files changed

+10
-165
lines changed

net/BUILD.gn

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,6 @@ if (is_linux) {
11951195
":epoll_server",
11961196
":quic_base",
11971197
":net",
1198-
":simple_quic_tools",
11991198
"//base",
12001199
"//third_party/boringssl",
12011200
]
@@ -1273,8 +1272,6 @@ source_set("simple_quic_tools") {
12731272
"tools/quic/quic_simple_client_session.h",
12741273
"tools/quic/quic_simple_client_stream.cc",
12751274
"tools/quic/quic_simple_client_stream.h",
1276-
"tools/quic/synchronous_host_resolver.cc",
1277-
"tools/quic/synchronous_host_resolver.h",
12781275
]
12791276
deps = [
12801277
":net",

net/net.gyp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -817,8 +817,6 @@
817817
'tools/quic/quic_simple_client_session.h',
818818
'tools/quic/quic_simple_client_stream.cc',
819819
'tools/quic/quic_simple_client_stream.h',
820-
'tools/quic/synchronous_host_resolver.cc',
821-
'tools/quic/synchronous_host_resolver.h',
822820
],
823821
},
824822
],
@@ -1275,7 +1273,6 @@
12751273
'../base/base.gyp:base',
12761274
'net',
12771275
'quic_base',
1278-
'simple_quic_tools',
12791276
],
12801277
'sources': [
12811278
'tools/quic/quic_client_bin.cc',

net/tools/quic/quic_client_bin.cc

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
#include "base/strings/string_split.h"
4848
#include "base/strings/string_util.h"
4949
#include "net/base/ip_endpoint.h"
50-
#include "net/base/net_errors.h"
51-
#include "net/base/net_log.h"
5250
#include "net/base/privacy_mode.h"
5351
#include "net/cert/cert_verifier.h"
5452
#include "net/http/transport_security_state.h"
@@ -59,7 +57,6 @@
5957
#include "net/tools/epoll_server/epoll_server.h"
6058
#include "net/tools/quic/quic_client.h"
6159
#include "net/tools/quic/spdy_utils.h"
62-
#include "net/tools/quic/synchronous_host_resolver.h"
6360
#include "url/gurl.h"
6461

6562
using base::StringPiece;
@@ -172,18 +169,14 @@ int main(int argc, char *argv[]) {
172169
// protocol is required in the URL.
173170
GURL url(urls[0]);
174171
string host = FLAGS_host;
172+
// TODO(rtenneti): get ip_addr from hostname by doing host resolution.
175173
if (host.empty()) {
176-
host = url.host();
174+
LOG(ERROR) << "--host must be specified\n";
175+
return 1;
177176
}
178177
if (!net::ParseIPLiteralToNumber(host, &ip_addr)) {
179-
net::AddressList addresses;
180-
int rv = net::tools::SynchronousHostResolver::Resolve(host, &addresses);
181-
if (rv != net::OK) {
182-
LOG(ERROR) << "Unable to resolve '" << host << "' : "
183-
<< net::ErrorToString(rv);
184-
return 1;
185-
}
186-
ip_addr = addresses[0].address();
178+
LOG(ERROR) << "--host could not be parsed as an IP address\n";
179+
return 1;
187180
}
188181

189182
string host_port = net::IPAddressToStringWithPort(ip_addr, FLAGS_port);

net/tools/quic/quic_simple_client_bin.cc

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
#include "base/strings/string_split.h"
4848
#include "base/strings/string_util.h"
4949
#include "net/base/ip_endpoint.h"
50-
#include "net/base/net_errors.h"
51-
#include "net/base/net_log.h"
5250
#include "net/base/privacy_mode.h"
5351
#include "net/cert/cert_verifier.h"
5452
#include "net/http/http_request_info.h"
@@ -59,7 +57,6 @@
5957
#include "net/quic/quic_utils.h"
6058
#include "net/spdy/spdy_http_utils.h"
6159
#include "net/tools/quic/quic_simple_client.h"
62-
#include "net/tools/quic/synchronous_host_resolver.h"
6360
#include "url/gurl.h"
6461

6562
using base::StringPiece;
@@ -173,18 +170,14 @@ int main(int argc, char *argv[]) {
173170
// protocol is required in the URL.
174171
GURL url(urls[0]);
175172
string host = FLAGS_host;
173+
// TODO(rtenneti): get ip_addr from hostname by doing host resolution.
176174
if (host.empty()) {
177-
host = url.host();
175+
LOG(ERROR) << "--host must be specified\n";
176+
return 1;
178177
}
179178
if (!net::ParseIPLiteralToNumber(host, &ip_addr)) {
180-
net::AddressList addresses;
181-
int rv = net::tools::SynchronousHostResolver::Resolve(host, &addresses);
182-
if (rv != net::OK) {
183-
LOG(ERROR) << "Unable to resolve '" << host << "' : "
184-
<< net::ErrorToString(rv);
185-
return 1;
186-
}
187-
ip_addr = addresses[0].address();
179+
LOG(ERROR) << "--host could not be parsed as an IP address\n";
180+
return 1;
188181
}
189182

190183
string host_port = net::IPAddressToStringWithPort(ip_addr, FLAGS_port);

net/tools/quic/synchronous_host_resolver.cc

Lines changed: 0 additions & 109 deletions
This file was deleted.

net/tools/quic/synchronous_host_resolver.h

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)