Reland "Generalize for non-address results in HostResolverImpl"
This reverts commit e369ab31. Reason for revert: The CL in question did not cause issue 869227, which is a pre-existing infra problem. Original change's description: > Revert "Generalize for non-address results in HostResolverImpl" > > This reverts commit 07ee5f0f. > > Reason for revert: StartTestServer(SpawnedTestServer::SSLOptions()) > started failing after this CL > > https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac10.12%20Tests/17143 > > [ RUN ] SSLClientSocketReadTest.Read_WithSynchronousError/0 > [56283:775:1128/182253.758810:39802574526192:ERROR:local_test_server_posix.cc(79)] poll() timed out; bytes_read=0 > [56283:775:1128/182253.758860:39802574568901:ERROR:local_test_server_posix.cc(167)] Could not read server_data_len > [56283:775:1128/182253.760826:39802576544202:ERROR:ssl_client_socket_unittest.cc(830)] Could not start SpawnedTestServer > ../../net/socket/ssl_client_socket_unittest.cc:1532: Failure > Value of: StartTestServer(SpawnedTestServer::SSLOptions()) > Actual: false > Expected: true > Stack trace: > 0 net_unittests 0x000000010f41750b testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop(int) + 91 > 1 net_unittests 0x000000010f416ec9 testing::internal::AssertHelper::operator=(testing::Message const&) const + 89 > 2 net_unittests 0x000000010e7d9239 net::SSLClientSocketReadTest_Read_WithSynchronousError_Test::TestBody() + 585 > > [ FAILED ] SSLClientSocketReadTest.Read_WithSynchronousError/0, where GetParam() = false (10083 ms) > > Original change's description: > > Generalize for non-address results in HostResolverImpl > > > > Now extensively using HostCache::Entry internally (but only internally > > to preserve flexibility of HostCache) as a generalized results > > container within HostResolverImpl. Added some needed setter/merge > > functionality to Entry for that purpose. Many methods within the > > resolver changed to use Entry for consistency even if they only ever > > deal with address results, eg ResolveAsIP(). > > > > Slightly modified results port-setting functionality to only set port > > to an input port (from |host.port()|) if the port in the results is 0 > > (where before it would set it whenever it wasn't equal to the input > > port). This will be necessary eg for SRV support where DNS provides a > > specific port that needs to be maintained in the results. Also cleaned > > up the port setting to consistently only ever happen just before > > setting results on the RequestImpl and having 0 or a DNS-provided port > > until then. > > > > Bug: 846423 > > Change-Id: I679c0ac915e0f81b49adb5ee769f250be49c9c90 > > Reviewed-on: https://chromium-review.googlesource.com/c/1340835 > > Reviewed-by: Matt Menke <mmenke@chromium.org> > > Commit-Queue: Eric Orth <ericorth@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#611963} > > TBR=mmenke@chromium.org,ericorth@chromium.org > > Change-Id: Icc3121b6f6de985fb64ed9b2bee4951faf5378a3 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 846423 > Reviewed-on: https://chromium-review.googlesource.com/c/1354746 > Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org> > Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> > Cr-Commit-Position: refs/heads/master@{#612052} TBR=mmenke@chromium.org,ortuno@chromium.org,ericorth@chromium.org Change-Id: Ie2f80d423a5370f976918357b32b8eb772c4f57c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 846423 Reviewed-on: https://chromium-review.googlesource.com/c/1354267Reviewed-by:Matt Menke <mmenke@chromium.org> Commit-Queue: Matt Menke <mmenke@chromium.org> Cr-Commit-Position: refs/heads/master@{#612164}
Showing
This diff is collapsed.
Please register or sign in to comment