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)