Explainer PR(s):
- https://github.com/WICG/shared-storage/pull/199
- https://github.com/WICG/shared-storage/pull/205
How:
- Add the parameter parsing logic in the network service, and send the
final request to the browser process's central
SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
exact database result, we update observer's OnMethodFinished()'s
parameters accordingly. In the test observer, the error message is
further transformed into a boolean 'success' result. This callback
is only used in tests and it's not important to assert the detailed
result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
has been added to demonstrate the case where `SharedStorageUpdate`
encounters an error.
Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388298}
Refactor OnSharedStorageHeaderReceived() to utilize the common
mojom union type for shared storage headers. This alignment
eliminates code duplication, reducing maintenance overhead and the
risk of inconsistencies between the network service and Blink.
As part of this refactor, some validation is moved to the network
service (e.g. `key` length validation). There's no behavior change
overall: Unrecognized methods and parameters continue to be skipped,
and valid methods are processed as before.
Additionally, to resolve a "duplicate symbol" link error on Windows,
(due to url_loader_base now depends on mojom_shared_storage, and
blink's mojom_platform depends on url_loader_base) we include the
`mojom_shared_storage` target in mojom("mojom_modules")'s
overridden_deps_blink, and switch to PLATFORM_EXPORT from
MODULES_EXPORT for relevant files.
Bug: 373899210
Change-Id: I8fda87ad6bea7994d84ac1100e4d96a138cb444f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5990970
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1385815}
This CL moves the definition of GlobalRequestID::MakeBrowserInitiated()
out of the header file to prevent inlining. The method relies on a
static local atomic to guarantee that it vends unique IDs. Although a
statically-linked binary would only have a single definition for
MakeBrowserInitiated(), component builds could be problematic. If there
were multiple copies of MakeBrowserInitiated(), it would not be
guaranteed to vend unique IDs.
Separately, this CL also sidesteps some implementation-defined narrowing
integer conversions related to the `child_id` and `request_id` fields.
Bug: 352690892, 40065303
Change-Id: I49ac933a663bbce225b1098f38c8d4e5dfe3d237
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5702737
Reviewed-by: Joe Downing <joedow@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1328175}
The USE_SOCKET_BROKER flag was just "is_android || is_win" and since
the network service sandbox will not run on android this flag can be
replaced with just IS_WIN
Bug: 1485298
Change-Id: I8f153aa4ce3afc6442f47ce62db675385e9ff7e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4880087
Commit-Queue: Liza Burakova <liza@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1201616}
This CL added a new function `OnPrivateNetworkAccessPermissionRequired`,
to `URLLoaderNetworkServiceObserver` to trigger the private network
access permission prompt from `CorsUrlLoader` after receiving a valid
PNA preflight response.
The permission prompt is triggered only when a request created from a
secure context to a non-secure local device. `private-network-access-id` and `private-network-access-name` are required in the preflight response header to trigger the permission prompt. Otherwise the request will be
denied.
See more: https://docs.google.com/document/d/1Q18g4fZoDIYQ9IuxlZTaItgkzfiz_tCqaEAI8J3Y1WY/edit?usp=sharing
Bug: 1338439
Change-Id: I03586272cd404cc6dbceeaada09d21382760c4c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4593350
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Yifan Luo <lyf@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1160770}
This is a reland of commit 8313ecff25
The original had tests in shared_storage_header_observer_unittest.cc
failing on bots where DCHECK was disabled, as the test suite class
performed UTF conversion inside the DCHECK (and hence the conversion
was not happening on these bots).
We fix the erroneous test class methods so that the conversions
happen regardless of whether DCHECK is enabled, by verifying that
the conversion was successful with an EXPECT_TRUE instead.
Original change's description:
> Shared Storage: Add mojo method for observing response headers
>
> We are adding support for writing to Shared Storage from response
> headers. In a later CL, we will add code in the network service to
> parse the response headers. The parsed Shared Storage response headers
> will then be sent to the `StoragePartitionImpl` in the browser process
> via the `network::mojom::URLLoaderNetworkServiceObserverObserver`
> interface. From there, the information from the headers will be
> forwarded to the new `SharedStorageHeaderObserver` class, where, if
> valid, they will trigger calls to actual shared storage operations.
>
> Integration tests will be added in the follow-up CL
> https://crrev.com/c/4519162.
>
> This is part of a project to add support to writing to shared storage
> from response headers. See
> https://github.com/WICG/shared-storage/pull/70 for more information
> and https://crrev.com/c/4444068 for a working prototype for `fetch()`.
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 1434529,1218540
> Change-Id: I02cc34eede4dab32360ee09c5e05b02bc96e1325
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4519161
> Reviewed-by: Eric Orth <ericorth@chromium.org>
> Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1151469}
Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 1434529,1218540
Change-Id: I6a4bacb014a4ef4089750bfd2573aac63e6aa56d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4576878
Reviewed-by: Eric Orth <ericorth@chromium.org>
Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152032}
This reverts commit 8313ecff25.
Reason for revert: Suspected test failures https://ci.chromium.org/ui/p/chromium/builders/ci/fuchsia-arm64-rel/6790/overview. Cammie asked for the revert after a larger chat.
Original change's description:
> Shared Storage: Add mojo method for observing response headers
>
> We are adding support for writing to Shared Storage from response
> headers. In a later CL, we will add code in the network service to
> parse the response headers. The parsed Shared Storage response headers
> will then be sent to the `StoragePartitionImpl` in the browser process
> via the `network::mojom::URLLoaderNetworkServiceObserverObserver`
> interface. From there, the information from the headers will be
> forwarded to the new `SharedStorageHeaderObserver` class, where, if
> valid, they will trigger calls to actual shared storage operations.
>
> Integration tests will be added in the follow-up CL
> https://crrev.com/c/4519162.
>
> This is part of a project to add support to writing to shared storage
> from response headers. See
> https://github.com/WICG/shared-storage/pull/70 for more information
> and https://crrev.com/c/4444068 for a working prototype for `fetch()`.
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 1434529,1218540
> Change-Id: I02cc34eede4dab32360ee09c5e05b02bc96e1325
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4519161
> Reviewed-by: Eric Orth <ericorth@chromium.org>
> Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1151469}
Bug: 1434529,1218540
Change-Id: Id8e25be6000204c848d2d1d80e6b44ad8b568dfb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4577370
Reviewed-by: David Bertoni <dbertoni@chromium.org>
Commit-Queue: Solomon Kinard <solomonkinard@google.com>
Auto-Submit: Solomon Kinard <solomonkinard@chromium.org>
Owners-Override: Solomon Kinard <solomonkinard@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1151564}
We are adding support for writing to Shared Storage from response
headers. In a later CL, we will add code in the network service to
parse the response headers. The parsed Shared Storage response headers
will then be sent to the `StoragePartitionImpl` in the browser process
via the `network::mojom::URLLoaderNetworkServiceObserverObserver`
interface. From there, the information from the headers will be
forwarded to the new `SharedStorageHeaderObserver` class, where, if
valid, they will trigger calls to actual shared storage operations.
Integration tests will be added in the follow-up CL
https://crrev.com/c/4519162.
This is part of a project to add support to writing to shared storage
from response headers. See
https://github.com/WICG/shared-storage/pull/70 for more information
and https://crrev.com/c/4444068 for a working prototype for `fetch()`.
Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 1434529,1218540
Change-Id: I02cc34eede4dab32360ee09c5e05b02bc96e1325
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4519161
Reviewed-by: Eric Orth <ericorth@chromium.org>
Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1151469}
Currently, the network service is using NetworkChangeNotifierLinux,
which uses AddressTrackerLinux. Usage of AddressTrackerLinux is being
moved out of the network service as part of the network service sandbox
project, as AddressTrackerLinux uses netlink sockets which shouldn't be
allowed in the sandbox.
This CL syncs changes from a NetworkChangeNotifierLinux that runs in
the browser process to a NetworkChangeNotifierPassive that runs in the
network, which is identical to Android's mechanism (when it is running
an out-of-process network service).
This feature comes with a kill switch.
Bug: 1312226
Change-Id: I390d61b519eb93798bd46eb402e50740c7295b61
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4025032
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126816}
The failure in the rollback [1] is because one cookie was not cleared when the first CSD header is sent in clear_site_data_handler_browsertest.cc. This should only be possible if 3P cookie blocking is already enabled at the beginning of the test.
To patch this, I explicitly disable 3PCB at the start of the test.
To be conservative, I also explicitly enable the partitioned cookies feature so that it does not rely on the environment's default. Right now, partitioned cookies are enabled via the field trial testing config.
[1]: https://ci.chromium.org/ui/p/chrome/builders/ci/linux-chromeos-chrome/31221/overview
This is a reland of commit d27d50661e
Original change's description:
> Make Clear-Site-Data: "cookies" respect third-party cookie blocking
>
> This will prevent Clear-Site-Data from being abused for cross-site
> tracking [1] when partitioned cookies are enabled by default.
>
> [1]: https://github.com/privacycg/storage-partitioning/issues/11
>
> Old behavior: Clear-Site-Data could clear unpartitioned cookies from any context.
>
> New behavior: Clear-Site-Data cannot clear unpartitioned cookies if it came from a response where 3P cookie blocking applies.
>
> In both cases, CSD will delete partitioned cookies in the current partition.
>
> Low-Coverage-Reason:Some files have trial changes that do not impact behavior.
>
> Bug: 1416655
> Change-Id: Ieed1e050f8f376b7d7704b4948c8f59adc21a17f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4312585
> Reviewed-by: Nasko Oskov <nasko@chromium.org>
> Reviewed-by: Andrey Zaytsev <andzaytsev@google.com>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Daniel Murphy <dmurph@chromium.org>
> Commit-Queue: Dylan Cutler <dylancutler@google.com>
> Reviewed-by: Christian Dullweber <dullweber@chromium.org>
> Reviewed-by: Oleh Lamzin <lamzin@google.com>
> Cr-Commit-Position: refs/heads/main@{#1118080}
Bug: 1416655
Change-Id: I10e54ba18587c7c9a838e79dd52a535b5e8ff751
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4346675
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: Dylan Cutler <dylancutler@google.com>
Reviewed-by: Oleh Lamzin <lamzin@google.com>
Reviewed-by: Andrey Zaytsev <andzaytsev@google.com>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1119580}
This will prevent Clear-Site-Data from being abused for cross-site
tracking [1] when partitioned cookies are enabled by default.
[1]: https://github.com/privacycg/storage-partitioning/issues/11
Old behavior: Clear-Site-Data could clear unpartitioned cookies from any context.
New behavior: Clear-Site-Data cannot clear unpartitioned cookies if it came from a response where 3P cookie blocking applies.
In both cases, CSD will delete partitioned cookies in the current partition.
Low-Coverage-Reason:Some files have trial changes that do not impact behavior.
Bug: 1416655
Change-Id: Ieed1e050f8f376b7d7704b4948c8f59adc21a17f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4312585
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Andrey Zaytsev <andzaytsev@google.com>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Commit-Queue: Dylan Cutler <dylancutler@google.com>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Oleh Lamzin <lamzin@google.com>
Cr-Commit-Position: refs/heads/main@{#1118080}
This enables brokering on Windows for supported socket types (TCP).
BrokeredClientSocketFactory is also updated to delegate to
non-brokered sockets for SSL and UDP in order for the browser
to function.
Currently all TCP sockets are brokered but a future CL will add
a filter to only broker sockets that are intended for communications
with services bound to local network interfaces.
This CL also enables all the tests for Windows.
BUG=1295463,841001
Change-Id: I44ca9c99950560476a0fcd7d136589edc92b796c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3868532
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1045125}
Socket broker support will soon be expanded to OS other than Android.
In order to facilitate this, this CL defines a buildflag for the
supported OS, and replaces IS_ANDROID with this flag.
This CL also fixes a case where sandbox might be enabled by policy and
the broker would not be emplaced in this situation.
BUG=1348331
Change-Id: I3b06720849ffe6069796a1dd6f305ef78c982fa9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3792907
Commit-Queue: Will Harris <wfh@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1029554}
When the network service sandbox is enabled on Android, this will create
a socket broker instance associated with the NetworkContext and pass it
to the network service. This also adds an end-to-end test for TCP socket
brokering.
Bug: 1295460
Change-Id: Id52fbe93b681ff04423ea6efd4995577407df131
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3638642
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Liza Burakova <liza@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1019960}
Currently we call network::mojom::NetworkService::GetNetworkChangeManager
before calling NetworkService::SetParams, which is problematic. This
change fixes that by adding
NetworkServiceClient::OnNetworkServiceInitialized().
Bug: 1291971
Change-Id: If909f9f8dd72cb062080691ecba866c92ae5deea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3423726
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/main@{#965215}
Currently, when a site sends the Clear-Site-Data response header with
the "cookies" string, we clear all cookies for the request URL's domain.
After CHIPS, https://github.com/WICG/CHIPS, we want the Clear-Site-Data
to clear cookies set with the Partitioned attribute only if their
cookie partition key matches the partition key derived from the
request's NetworkIsolationKey. This additional constraint prevents sites
abusing the Partitioned attribute and Clear-Site-Data in order to
construct a cross-site identifier. For more information on this vector
for abuse, see
https://github.com/privacycg/storage-partitioning/issues/11
which discusses it in the context of partitioned storage since the same
principle applies to cookies.
Bug: 1225444
Change-Id: Icee3bc17d5ac1559e9591c0c90c466043bd22696
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3249211
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Oleh Lamzin <lamzin@google.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/main@{#955781}
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).
This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.
IWYU cleanup is left as a separate pass that is easier when these macros
go away.
Bug: 1010217
Change-Id: Iea478401b7580682c7b9f195f7af9cbbdb6ce315
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3167292
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923194}
This CL creates a new mojo target for three files that don't
need the large url_request_mojom_traits.h traits header.
On my machine, this reduces the total build size from
236,200,425,638 to 234,822,552,595 bytes, a reduction
by 1.37 GB or 0.6%.
Bug: 1227131, 242216
Change-Id: Ib2f729edb62880e16183408966d429e8b06c496d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3048296
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#905715}
Currently these messages are not scoped to the frame ID, but in order
to remove the GetTotalNetworkUsages() method in the future we scope the
DataUseUpdate to have some context. Since this is the last method on
the NetworkServiceClient we can remove that interface. To make sure
that OnDataUseUpdate is not possibly skipped because an URLLoaderFactory
may not provide a URLLoaderNetworkServiceObserver a default one is
added to the construction of the NetworkService.
BUG=1173710
Change-Id: If385cce47e343c02239e3c6e0895499945515044
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2732792
Reviewed-by: Yoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Mahmoud Gawad <mgawad@google.com>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#861597}
In order to remove the use of routing IDs in the network service move
LoadInfo sending to an associated observer. This however prevents
batched messages from being sent and coalesced so the logic in
WebContentsImpl is improved to handle these cases.
BUG=1173710
Change-Id: Ia2de69262d1885534e689ead7b5794bcedecc283
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2725151
Reviewed-by: Mahmoud Gawad <mgawad@google.com>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#860294}
This new interface provides additional framework to remove routing IDs
from the network service in the future. Messages are dispatched
directly to interested agent and there is no need for the process id
or routing id in these devtools messages now.
Add a new DevToolsObserver interface. Since this new interface is now
dependent on URLRequest separate those structs out into an individual
mojom file. Mojo doesn't support forward defines of interfaces so they
all need to be in the same file.
Pass a DevToolsObserver interface into URLLoaderFactory and the
URLLoader so we can associated requests against the associated
DevToolsAgentHost. The DevToolsAgentHost is either bound based on a
service worker or the FrameTreeNode.
BUG=1173710
Change-Id: I76bbea3d4d44cd178a38498fa417842060508441
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2713968
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#858738}
This CL reports CORS RFC-1918 problems from the network service to
DevTools without sharing any information with the renderer. In contrast
to approaches that file issues in the renderer this has several
advantages:
- The issues are filed right where the checking logic bottleneck is
thus we are guaranteed to not miss any issues.
- The issue details are not shared with the renderer process, thus
we can attach information that we don't want to share, or rather
wouldn't share with the renderer.
The issues are reported even if DevTools is closed, but only introduce
overhead if either an upcoming deprecation is detected, or an actual
error is encountered.
Change-Id: If32d3429845b19f681a8b42116028729e3fc1b9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2663547
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Titouan Rigoudy <titouan@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#852549}
This CL reports the IPAddressSpace as computed by the URLLoader
to DevTools via the responseReceivedExtraInfo CDP message. This
is useful for the non-error path (many error paths abort the
request earlier, and the responseReceivedExtraInfo is not sent).
In the case of an error, the error reports this information.
Bug: chromium:1141824
Change-Id: I38db7bb8a7a493c6443d44425d8ec798c09bd531
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2640533
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Titouan Rigoudy <titouan@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848167}
This CL adds a new "TrustTokenOperationResult" mojo structure that
is emitted in a new NetworkServiceClient event. The structure is used
to convey the exact operation status as well as additional
operation-dependent data to DevTools to allow better Trust Token
debugging.
Follow up CLs will pipe the event all the way through to the DevTools
network handler and instrument the redemption and signing operations.
R=davidvc@chromium.org
Bug: chromium:1126824
Change-Id: I04dd881a74221b3f96a9eea74e39b2d50c9ee20c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2513593
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: David Van Cleve <davidvc@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830530}
This CL reports the IP address space of the initiator in the
requestWillBeSentExtraInfo event as well as the applied
PrivateNetworkRequestPolicy. This is one CL in a series that allows
DevTools to surface relevant information for debugging RFC-1918
violations.
Bug: chromium:1128885
Change-Id: I93d93ad00ac4e4705eeef6bd9f49224782fd30a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494944
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829613}
CORS-for-content-scripts has shipped in M85 - afterwards, the UKM and
UMA metrics should only be logged for allowlisted extensions. In M87 we
have removed the allowlist (r807240) which means that the metrics can't
be utilized going forward. Additionally, we would proceed with
deprecating the allowlist, even if the metrics would show that some
extensions might still be _hypothetically_ affected.
For the reasons listed above, this CL removes the UKM and UMA metrics
for CORS-for-content-scripts. This corresponds roughly to reverting the
following CLs: r739693 (UMA) and r750700 (UKM). Note that Rappor has
been added in r746508, but has been already removed in r768003 (and
therefore this CL doesn't touch any Rappor-related code or files).
Bug: 920638, 1125776
Change-Id: I5b410d9e17a19ae0d3eec8727317ae940bf1896c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2396712
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Commit-Queue: Jesse Doherty <jwd@chromium.org>
Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808464}
This change updates CookieObserver OnCookiesAccessed to take in
CookieAccessResultList instead of CookieStatusList in efforts to
consistently start return CookieAccessResult across the code and
cleanup CookieStatusList. This change is related to [1],
so CookieStore will eventually be able to return EffectiveSameSite
for SameSite across all its endpoints.
[1] https://crbug.com/1092695
Bug: 1091846
Change-Id: I023d53551971b09944145fb41025df2e358d278c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2284225
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Maksim Orlovich <morlovich@chromium.org>
Reviewed-by: Lily Chen <chlily@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788262}
Currently CORS preflight OPTIONS requests are not shown in DevTools.
When OutOfBlinkCORS is not enabled, Blink’s ThreadableLoader fetches
the CORS preflight requests, and the preflight request information is
sent to DevTools from ThreadableLoader
(http://trac.webkit.org/changeset/90340).
But when OutOfBlinkCORS is enabled, the CORS preflight requests are
fetched from the network process. And the preflight request
information is not sent to DevTools.
To fix this problem, this CL introduces 3 methods
(OnCorsPreflightRequest/Response/RequestCompleted) to
NetworkServiceClient mojo interface. PreflightLoader in the network
process calls these methods to pass the preflight request information
to the browser process. NetworkServiceClient in the browser process
receives the information and passes it to DevTools.
Bug: 941297
Change-Id: I56c1b5acd06ba06380986f054ea60473ab80ff52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2054468
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745781}
This CL cleans up old Mojo types for
network::mojom::NetworkChangeManager from WebRtcVideoCaptureBrowserTest
using Remote and updates comments
with new Mojo types.
Bug: 955171
Change-Id: I7c9fb2e49cbf1307c994533e8480a207e9162a94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1939528
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720247}