New issue
Advanced search Search tips

Issue 811910 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Remove ProxyConfig::id() and ProxyResolutionService::ReconsiderProxyAfterError()

Project Member Reported by eroman@chromium.org, Feb 13 2018

Issue description

Concretely, remove:

  ProxyConfig::id()
  ProxyConfig::is_valid()
  ProxyInfo::config_id()

And also remove ProxyResolutionService::ReconsiderProxyAfterError() which was the consumer of it.

The ProxyConfig::id() was an internal concept which relates a proxy configuration to a particular epoch for when it was fetched. However it is part of the public interface and is being abused by other layers (especially "is_valid()") to represent whether a ProxyConfig is optional or not, and using random IDs for the epoch.

This concept should be removed as it is confusing, and the underlying use-case for it is overly complicated (and was responsible for issue 723589). This awkwardness has come up during some recent refactorings for servicification, network traffic annotations, and cleanups as a source of confusion.

The feature that ProxyConfig::id supports today is to re-resolve the proxy for the URL in response to the proxy settings having changed since a previous attempt was made during fallback. 

AFAICT there is no data showing this current mode to be useful, or why it is justified for such a narrow window. As I recall the original reason for doing it dates back to when notification of proxy settings was not async via a service, and hence there were more poll points to determine when settings had changed.

From a strict layering standpoint, it is cleaner to just do proxy resolution once, and for fallback to simply walk down that proxy list without the possibility of needing to do another asynchronous proxy resolve to get an entirely new list. This model is consistent with how we do things elsewhere in the stack (like connecting to one of many IP addresses from host resolution).
 

Comment 1 by eroman@chromium.org, Feb 13 2018

Summary: Remove ProxyConfig::id() and ProxyResolutionService::ReconsiderProxyAfterError() (was: Remove ProxyConfig::id())
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/750af4b1f0a1ab4ecc61f7c931348190d459d3be

commit 750af4b1f0a1ab4ecc61f7c931348190d459d3be
Author: Eric Roman <eroman@chromium.org>
Date: Thu Feb 22 22:38:53 2018

Remove ProxyConfig::id() and ProxyResolutionService::ReconsiderProxyAfterError()

This is a cleanup that removes some unnecessary complexity.

The consequence of this change is that the proxy configuration used for a request can no longer change mid-request (while applying the fallback list). This was an unlikely situation, so the slight policy change is not expected to have an impact one way or another.

TBR: stevenjb@chromium.org, dcheng@chromium.org
Bug:  811910 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I4920440fa72aa8940c3f77cbed9a5e74ea426f1c
Reviewed-on: https://chromium-review.googlesource.com/917401
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Eric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538595}
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.h
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate_unittest.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/components/data_reduction_proxy/core/browser/data_reduction_proxy_util.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/components/data_reduction_proxy/core/browser/data_reduction_proxy_util.h
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/components/proxy_config/pref_proxy_config_tracker_impl_unittest.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/google_apis/gcm/engine/connection_factory_impl.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/http/http_stream_factory_impl_job_controller.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/http/http_stream_factory_impl_job_controller_unittest.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/log/net_log_util.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/proxy_resolution/proxy_config.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/proxy_resolution/proxy_config.h
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/proxy_resolution/proxy_config_service_linux.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/proxy_resolution/proxy_config_service_linux.h
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/proxy_resolution/proxy_info.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/proxy_resolution/proxy_info.h
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/proxy_resolution/proxy_info_unittest.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/proxy_resolution/proxy_service.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/proxy_resolution/proxy_service.h
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/proxy_resolution/proxy_service_unittest.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/net/url_request/url_request_ftp_job_unittest.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/services/network/network_context_unittest.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/services/network/proxy_resolving_client_socket.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/services/network/proxy_resolving_client_socket_unittest.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/services/network/public/cpp/proxy_config_mojom_traits.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/services/network/public/cpp/proxy_config_mojom_traits.h
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/services/network/public/cpp/proxy_config_mojom_traits_unittest.cc
[modify] https://crrev.com/750af4b1f0a1ab4ecc61f7c931348190d459d3be/services/network/public/mojom/proxy_config.mojom

Project Member

Comment 3 by bugdroid1@chromium.org, Feb 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/89f482cb352bccc59877ef4070d4da17e494a1b7

commit 89f482cb352bccc59877ef4070d4da17e494a1b7
Author: Eric Roman <eroman@chromium.org>
Date: Wed Feb 28 01:30:44 2018

Remove some lingering references to ProxyResolutionService::ReconsiderProxyAfterError().

Which no longer exists.

Also fixes a discrepency in two tests where the comment did not match the behavior -- changed the behavior to match the comment.

Bug:  811910 
Change-Id: I6a2aa8a24e23328525dcf8fb71e10d7ff32e196d
Reviewed-on: https://chromium-review.googlesource.com/939738
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Helen Li <xunjieli@chromium.org>
Commit-Queue: Eric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539624}
[modify] https://crrev.com/89f482cb352bccc59877ef4070d4da17e494a1b7/net/proxy_resolution/proxy_list.cc
[modify] https://crrev.com/89f482cb352bccc59877ef4070d4da17e494a1b7/net/proxy_resolution/proxy_service.h
[modify] https://crrev.com/89f482cb352bccc59877ef4070d4da17e494a1b7/net/proxy_resolution/proxy_service_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment