Chromium changes:
https://chromium.googlesource.com/chromium/src/+/5ba07f7e15d9c0fce4c3e7f3a0d81b7e2d0e1ac1https://chromium.googlesource.com/chromium/src/+/36a1fd69363120111a078f9b0e3d5458b9a6f461https://chromium.googlesource.com/chromium/src/+/0049a0b7166118b686e736fd4a672ce0bb02e182
commit 5ba07f7e15d9c0fce4c3e7f3a0d81b7e2d0e1ac1
Author: Matt Reichhoff <mreichhoff@chromium.org>
Date: Thu Oct 21 20:36:32 2021 +0000
Remove TestNetLog and its subclasses
This builds on the prior deletion of use of these classes.
RecordingNetLogObserver remains in place and is used instead
of the prior classes. Future cleanup will target NetLog pointers.
Bug: 1052479
commit 36a1fd69363120111a078f9b0e3d5458b9a6f461
Author: Matt Reichhoff <mreichhoff@chromium.org>
Date: Tue Oct 12 22:52:20 2021 +0000
Remove direct use of RecordingTestNetLog
This is the first of several commits to address
test_net_log cleanup. Future commits will target
RecordingBoundTestNetLog, full deletion of the
classes, and removal of many NetLog pointers.
Bug: 1052479
commit 0049a0b7166118b686e736fd4a672ce0bb02e182
Author: Matt Reichhoff <mreichhoff@chromium.org>
Date: Wed Oct 20 20:44:26 2021 +0000
Remove direct use of RecordingBoundTestNetLog
This builds on the prior deletion of use of TestNetLog and
RecordingTestNetLog. A future commit will delete the classes.
Bug: 1052479
The correct replacements are:
- ProxyServer::FromURI() -> net::ProxyUriToProxyServer()
- ProxyServer::ToURI() -> net::ProxyServerToProxyUri()
Chromium change:
https://chromium.googlesource.com/chromium/src/+/5ccc3f0d4f3bb7d9b9caa93c266f3dbdfbf83205
commit 5ccc3f0d4f3bb7d9b9caa93c266f3dbdfbf83205
Author: Eric Orth <ericorth@chromium.org>
Date: Thu Sep 23 00:01:57 2021 +0000
Split ProxyServer PAC/URI conversion to a separate file
No functional change.
Helps simplify the ProxyServer class around its core purpose of
representing proxy servers for net stack connections, which will
make it easier to make upcoming refactors to both that and the
separated-off conversion functionality.
Bug: 1243398
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/2d59e682ab9eb904124f5778eb8ceb3cb2a90231
commit 2d59e682ab9eb904124f5778eb8ceb3cb2a90231
Author: Anton Bikineev <bikineev@chromium.org>
Date: Tue May 18 12:29:22 2021 +0000
Deprecate base/optional.h and fix remaining mentions.
Docs are still to be updated (in a followup).
Bug: 1202909
Converted remaining cases of base::Optional to absl::optional, plus
updated DEPS file with an exception that is temporarily required
while we don't have such exception added to Chromium's toplevel DEPS
file (see commit linked below, not yet included in 92.0.4503.5).
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9662571bb2954fb1759c49e5c45e59571cd1899e
commit 9662571bb2954fb1759c49e5c45e59571cd1899e
Author: Anton Bikineev <bikineev@chromium.org>
Date: Thu May 13 19:17:50 2021 +0000
Reland "Alias base::Optional to absl::optional"
This relands f3493eb4f80c5716ed2d7de195f710537beacc6b. The reason of the
failure: missing base// dep in some of the internal components, which
caused the branded builds to fail.
For sherrifs: the change may cause build failures on bots that are not
tested in the regular CQ pipeline. Those issues are mostly caused by
missing base// dependencies. Before reverting this change, please
consider fixing missing dependencies, similar to what the CL 2891488
does.
Original CL description:
> Alias base::Optional to absl::optional
>
> This CL does the following:
> 1) Replaces base::Optional and friends with aliases to corresponding
> entities from abseil. base::in_place is the only thing not aliased, as
> it's also used in other contexts (e.g. StructPtr in mojo).
> 2) Replaces all optional-related uses of base::in_place with
> absl::in_place.
> 3) Fixes missing headers (e.g. base/check.h) that used to be recursively
> included from base/optional.h
> 4) Also, removes forward declarations for base::Optional and instead
> includes "base/optional.h" directly. The argument is the same as for
> forward declarations of std types - the exact declaration (struct vs
> class, number of template arguments (e.g. for SFINAE)) is an
> implementation detail that can change.
>
> The CL also tries to support base/optional_unittest.cc (will be removed
> with base/optional.h) however the nocompile is already removed, since
> supporting it seems to be harder.
>
> Followup CLs will replace base::optional with absl::optional per
> component.
>
> Bug: 1202909
> Change-Id: I25b276401ceba13da35b3a0331d5ccbd338c4539
> AX-Relnotes: n/a.
> Reviewed-on:
> https://chromium-review.googlesource.com/c/chromium/src/+/2892208
> Commit-Queue: Anton Bikineev <bikineev@chromium.org>
> Commit-Queue: Peter Kasting <pkasting@chromium.org>
> Reviewed-by: Peter Kasting <pkasting@chromium.org>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Owners-Override: Peter Kasting <pkasting@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#882460}
Bug: 1202909
Removed NIK method we added (GetEffectiveTopFrameOrigin) because
Chromium's own GetTopFrameSite performs the same functionality.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/e6e4f399a1c124f7aef06cce915dcb87d3a7facf
commit e6e4f399a1c124f7aef06cce915dcb87d3a7facf
Author: Matt Menke <mmenke@chromium.org>
Date: Thu Oct 8 11:41:29 2020 +0000
Remove original origin fields from NetworkIsolationKey.
They're mostly not being used, since IsolationInfo now mirrors those
fields.
While the fields in IsolationInfo still have one issue the fields in
NetworkIsolationKey had (namely, they may be site instead of origin,
for requests created from a NetworkIsolationKey), this does resolve one
of the issues with the field: NetworkIsolationKeys are used as keys,
and having two NIKs that are logically equal buy observably different
is a potential source of bugs.
Bug: None
This patch changes ProxyConfigServiceTor::CircuitIsolationKey() to rely
on upstream's net::NetworkIsolationKey() instead of implementing pretty
much the same logic manually.
Note that net::NetworkIsolationKey() does not provide a way to retrieve
its internal |top_frame_origin_|, which stores the origin/etld+1 of the
original top frame passed on constructions, which is what we need for
the CircuitIsolationKey according to the Tor design specs. For this
reason, this patch also provide a chromium_src override for the file
//net/base/network_isolation_key.h that adds an extra helper for that.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/3be01ba90cc361969ccee64a0d735587de84f7a3
commit 3be01ba90cc361969ccee64a0d735587de84f7a3
Author: Eric Roman <eroman@chromium.org>
Date: Fri Apr 3 21:37:09 2020 +0000
Reland "Add quick check parameter to ConfiguredProxyResolutionService ctor"
This reverts commit 89fd75a0105852eae12909a1a82d7add4f269c1e.
Original change's description:
> Add quick check parameter to ConfiguredProxyResolutionService ctor
>
> Doing this cleans up an undesirable ConfiguredProxyResolutionService
> usage pattern where code that primarily works with a
> ProxyResolutionService must currently cast to the specialized class
> before setting the right PAC quick check value.
>
> Bug: 1032820
Chromium change:
https://chromium.googlesource.com/chromium/src/+/9d383314fa8cbde76f36e5f9b138cd8a844f956c
commit 9d383314fa8cbde76f36e5f9b138cd8a844f956c
Author: Nicolas Arciniega <niarci@microsoft.com>
Date: Tue Feb 18 23:36:41 2020 +0000
Refactor ConfiguredProxyResolutionService::Request
This change moves out ConfiguredProxyResolutionService::Request into its
own file and renames it to ProxyResolutionRequest. This will be
necessary later on when we create a second version of the
ConfiguredProxyResolutionService under a base ProxyResolutionService
that relies completely on system APIs. In that second version, we will
also want to track the status of a proxy resolution request.
This change is intended to introduce zero functional changes. It is a
pure refactor change.
Bug: 1032820
Chromium change:
https://chromium.googlesource.com/chromium/src/+/d2013f9668d0587b1042572dadc6bd2e772d3248
commit d2013f9668d0587b1042572dadc6bd2e772d3248
Author: Nicolas Arciniega <niarci@microsoft.com>
Date: Fri Feb 7 23:00:56 2020 +0000
Rename ProxyResolutionService to ConfiguredProxyResolutionService
This change is the first step in creating a proxy resolver that
completely relies on the underlying system to figure out a proxy. The
ProxyResolutionService is currently deeply tied to the notion of first
fetching proxy configurations (ex: a PAC URL) and then using those
configurations to resolve a proxy. Since a proxy resolver that truly
defers to the underlying operating system for all proxy logic does not
follow this model, it is helpful if we separate the generic
ProxyResolutionService from the notion of configurations.
This change renames the existing ProxyResolutionService, which relies
on fetching proxy configurations, to ConfiguredProxyResolutionService.
The only other changes to this file are suggestions from presubmit and
Tricium.
A set of future CLs will break up the ConfiguredProxyResolutionService
into the logical pieces needed to create a new, generic
ProxyResolutionService that does not necessarily depend on configs.
This change is intended to introduce zero functional changes. It is a
pure refactor change.
Bug: 1032820
Chromium change:
https://chromium.googlesource.com/chromium/src/+/8045afd1e3fea6a92af66d8d1db34133edbb2b09
commit 8045afd1e3fea6a92af66d8d1db34133edbb2b09
Author: Matt Menke <mmenke@chromium.org>
Date: Thu Nov 14 20:31:19 2019 +0000
NetworkIsolationKeys + PAC scripts PS6: ProxyResolver
Make the ProxyService API take a NetworkIsolationKey and pass it down to
the ProxyResolver. Also make the main consumer actually pass in
requests' NIK.
Some other callsites still need to be updated to pass in NIKs.
Also introduce new pattern of using NetworkIsolationKey::Todo() to
create empty NetworkIsolationKeys() in places that should be modified
to pass in populated NetworkIsolationKeys.
Bug: 1021661
Along with a few other test classes, see below.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/2dfa2ba40a372f4a08ba0d051b5cbe5accf2c526
commit 2dfa2ba40a372f4a08ba0d051b5cbe5accf2c526
Author: Gabriel Charette <gab@chromium.org>
Date: Tue Sep 10 00:28:54 2019 +0000
[TaskEnvironment] Remove old types
Explicitly (to document for git log purposes), this removes:
- base::test::ScopedTaskEnvironment
- net::WithScopedTaskEnvironment
- net::TestWithScopedTaskEnvironment
- content::TestBrowserThreadBundle
- web::TestWebThreadBundle
Mass migrate stragglers which landed under old names after initial
mass migration.
TBR=dcheng@chromium.org
(to bypass owners for mechanical changes outside //base)
Bug: 992483
base/test/scoped_task_environment.h -> base/test/task_environment.h
content/public/test/test_browser_thread_bundle.h -> content/public/test/browser_task_environment.h
net/test/test_with_scoped_task_environment.h -> net/test/test_with_task_environment.h
Chromium change:
https://chromium.googlesource.com/chromium/src/+/c7108748948a6ab308f323d6e72c59d29c7e240a
commit c7108748948a6ab308f323d6e72c59d29c7e240a
Author: Gabriel Charette <gab@chromium.org>
Date: Fri Aug 23 03:31:40 2019 +0000
Reland "[TaskEnvironment] Complete migration with header rename"
This is a reland of 18947083c7e75ec6d5e8c3b729515d83bde41c59
The move_source_file.py script's formatting rules incorrectly
formatted services/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
after all. But we also can't rely 100% on git cl format (crbug.com/997063)
so I ended up performing a git cl format && git add -up
(+interactive addition of missing blank line after foo.h when included
from top of foo.cc)
Also added
$ tools/git/move_source_file.py net/test/test_with_scoped_task_environment.h net/test/test_with_task_environment.h
Original change's description:
> [TaskEnvironment] Complete migration with header rename
>
> This is merely:
>
> $ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
> $ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
> $ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
> $ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
> $ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
>
> and a few manual renames in DEPS files missed by the script
>
> This CL uses --bypass-hooks to avoid having to git cl format because
> many headers are being reordered by git cl format and it's too many to
> figure out in a no-op CL which ones are okay with it.
> windows.h for one should typically be first and another one of the
> reorderings in PS3 even caused a compile failure:
> https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.cc
>
> TBR=dcheng@chromium.org
>
> Bug: 992483
When NetworkService is enabled, we only have access to profile-wise
proxy config. So we discard proxy config per url request path to have a
global proxy config for tor profile and insert username/password when it
is about to resolve proxy in net::ProxyResolutionService.
Note
1. new flow works no matter NetworkService enabled or not.
2. ProxyConfigServiceTor has to be NET exported to avoid //net circular
dependency.
3. ProxyConfigMonitor chromium overrides is for setting profile-wise
proxy config without setting proxy_config::prefs::kProxy which will be
interfered by other components(ex. DataReductionProxyService)