0
Commit Graph

502 Commits

Author SHA1 Message Date
Peilin Wang
d2c79bcd6d Revert "Add new API to delete all WebStorage in WebView"
This reverts commit 393033a0c6.

Reason for revert: breaking ci bots https://ci.chromium.org/ui/p/chromium/builders/ci/Android%20WebView%20O%20(dbg)/26010/overview

Original change's description:
> Add new API to delete all WebStorage in WebView
>
> The current implementation only deletes the types of storage available
> when the API was introduced.
>
> This change introduces a new set of APIs that will delete all storage
> data. These methods will be exposed through the AndroidX library for
> apps to use.
>
> The existing implementation is renamed to indicate that it is used by
> the Android framework.
>
> Bug: 373558938
> Change-Id: Iac61b2403fad73a3170904613e784915278185de
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5934451
> Reviewed-by: Nate Fischer <ntfschr@chromium.org>
> Commit-Queue: Peter Pakkenberg <pbirk@chromium.org>
> Reviewed-by: Christian Dullweber <dullweber@chromium.org>
> Reviewed-by: Adam Walls <avvall@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1390255}

Bug: 373558938
Change-Id: I14fba91922ab2fb53da3db622d4e7f541599b25e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6064225
Reviewed-by: Peilin Wang <peilinwang@google.com>
Owners-Override: Peilin Wang <peilinwang@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Peilin Wang <peilinwang@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1390519}
2024-12-02 19:44:41 +00:00
Peter Birk Pakkenberg
393033a0c6 Add new API to delete all WebStorage in WebView
The current implementation only deletes the types of storage available
when the API was introduced.

This change introduces a new set of APIs that will delete all storage
data. These methods will be exposed through the AndroidX library for
apps to use.

The existing implementation is renamed to indicate that it is used by
the Android framework.

Bug: 373558938
Change-Id: Iac61b2403fad73a3170904613e784915278185de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5934451
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Commit-Queue: Peter Pakkenberg <pbirk@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Adam Walls <avvall@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1390255}
2024-12-02 11:38:05 +00:00
Peter Boström
fc7ddc185b Migrate to NOTREACHED() in content/
NOTREACHED() and NOTREACHED_IN_MIGRATION() are both CHECK-fatal now.
The former is [[noreturn]] so this CL also performs dead-code removal
after the NOTREACHED().

This CL does not attempt to do additional rewrites of any surrounding
code, like:

if (!foo) {
  NOTREACHED();
}

to CHECK(foo);

Those transforms take a non-trivial amount of time (and there are
thousands of instances). Cleanup can be left as an exercise for the
reader.

This does clean up kCrashOnDanglingBrowserContext as both paths of the
kill switch are currently fatal. This has been rolled out for a long
time.

Bug: 40580068, 40062641
Change-Id: Ib88e710d003e2e48df3fc502ca54d2341d157a0e
Cq-Include-Trybots: luci.chromium.try:linux-dcheck-off-rel
Low-Coverage-Reason: OTHER Should-be-unreachable code
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5974816
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1376522}
2024-10-31 19:37:21 +00:00
Eric Lawrence
a5e738f232 Ignore Strict-Transport-Security on https://localhost responses
Localhost is inherently a secure context, and Strict-Transport-Security
response headers can cause problems because they are not isolated by
port causing compatibility problems for web developers testing locally
as well as end-users who use software packages that commonly spin up
localhost webservers for ephemeral reasons (e.g. communication of an
auth token from a web login to a local software package). If one local
listener sets Strict-Transport-Security on a localhost response, it
will be applied to all subsequent localhost requests regardless of port.

We resolve this problem by matching Firefox and ignoring HSTS headers
on responses from localhost URLs.

Bug: 41251622
Change-Id: Ibebddb97aabe3f2a9c2a6008d314116cafe28a1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5923046
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Eric Lawrence <ericlaw@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1375901}
2024-10-30 16:55:58 +00:00
Nan Lin
f480b04528 Replace BrowsingDataFilterBuilderImpl::MatchesWithSavedStorageKey with
std::equal_to

This is to avoid dangling pointer when the callback is run.

Bug: 353506686
Change-Id: I2dae05aa5b4c255ee7ffed5b589cd6eb64df34dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5947364
Auto-Submit: Nan Lin <linnan@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1371535}
2024-10-21 18:35:56 +00:00
Liang Zhao
11eecbbd95 Use clearer parameter name in CreateLoginDelegate
The is_request_for_primary_main_frame parameter of CreateLoginDelegate()
could mean whether the request is for any resources in the primary main
frame, or whether the request is for primary main frame navigation.

The current name has confused people and caused bugs. The bugs were
fixed in http://crrev.com/c/5882129. As a follow up of that change, this
change adds _navigation to the parameter name to make it clear so that
we don't have this confusion in the future.

Bug: 40792637
Change-Id: I6cb8f729b703ad2ca23488287436424a10a3ace8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5910076
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Liang Zhao <lzhao@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1367732}
2024-10-11 20:11:51 +00:00
Tom Sepez
56b5eeb5fb Correct moves of const std::optional<> contents.
Use a variety of techniques to avoid unintentional copies.

-- remove stray consts that block move.
-- pass by const-ref where reasonable.
-- remove optional<> if value always present.
-- convert one else to early return to prove moved lifetime ends.

This CL was uploaded by git cl split.

R=ayui@chromium.org, clamy@chromium.org, hayato@chromium.org, toyoshim@chromium.org

Bug: 369952985
Change-Id: Ie66a7e6d4edc198f694d80e28ddd2f08b547cdfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5906790
Commit-Queue: Camille Lamy <clamy@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Auto-Submit: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1364264}
2024-10-04 16:19:29 +00:00
Liang Zhao
df26ee6b96 Fix basic auth issues for sub frame and sub resources
There is a is_main_frame parameter used by basic authentication handling
code to interact with WebRequestAPI and login dialog showing code, and
that parameter is not set correctly for certain scenarios.

For WebRequestAPI, the parameter is used to adjust child_id to -1 of
proxied_request_id in WebRequestAPI::MaybeProxyAuthRequest for correctly
identifying the request. However, WebRequestAPI code uses -1 as
render_process_id not by whether it is main frame, but by whether it is
navigation. Therefore, with current code, we will not receive
onAuthRequired for sub frame navigations.

For login dialog showing code, it behaves differently by whether it is
main frame navigation or other requests. However, basic authentication
handling code in StoragePartitionImpl::OnAuthRequired treat this
parameter as meaning requests for main frame navigation or subresource
requests in main frame when the frame is under service worker.
Therefore, with current code, we will not show login dialog for
subresources when the page is under service worker control.

To fix the issues, we add another parameter to indicate whether it is a
request for navigation and use that when interacting with WebRequestAPI,
and correctly set is_main_frame as false for subresource requests when
the page is under service worker control.

Added WebRequestAPI tests for sub frame navigation and sub resource
request, for the cases where the page is under service worker control
and where it is not under service worker control.

Also updated ServiceWorkerBasicAuthTest to reflect the correct
expectation for subresource requests, and expand the tests to cover both
the case where the page is under service worker control and not under
service worker control.

Bug: 40676156,40792637,41459173
Change-Id: I6a716ec0228fcb2332a985c15c9bffbabb4a4dde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5882129
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Liang Zhao <lzhao@microsoft.com>
Reviewed-by: David Bertoni <dbertoni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1363749}
2024-10-03 18:16:53 +00:00
Filipa Senra
19a187d3ca [iOS][QD] Record UserDeletedCookieOrCacheFromDialog histogram
This CL records the UserDeletedCookieOrCacheFromDialog histogram for QD.
It also does a small clean up so whenever the
UserDeletedCookieOrCache|FromDialog histograms are recorded, the same
common enum is used.

NO_IFTTT=Adding new IFTT for existing enum not changing the entries.

Bug: 337008330, 335387869
Change-Id: I042e88aa119e7ff74d5457bc786affe0b8b4bcbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5860079
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Filipa Senra <fsenra@google.com>
Cr-Commit-Position: refs/heads/main@{#1359954}
2024-09-25 15:27:23 +00:00
Arthur Sonzogni
0a5d54489f Spanify: content/ (c-array conversions only)
Addresses ~14% of `-WUnsafe-buffer-usage` opt-out in `//content`.
This is a #cleanup.

The patch was initially partially generated by `./tool/clang/spanify`.

This patch applies conversions specifically to c-arrays in `//content`.
Although the `spanify` tool supports broader conversions, this change
intentionally focuses on c-arrays. Several manual fixes were made to
address anonymous struct issues and other edge cases encountered during
the conversion process.

Bug: 342213636, 40285824
Change-Id: I72666faa45a461ea27bb3608beeacc6c9fcd8a63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5824992
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1349804}
2024-09-02 11:23:35 +00:00
Lei Zhang
05c13df891 Remove unnecessary ContentBrowserTest::SetUpCommandLine() calls
ContentBrowserTest::SetUpCommandLine() is actually not defined. Calls to
this method ends up running BrowserTestBase::SetUpCommandLine(), which
is always going to be empty. Since there is no point in calling this
method, delete all the callers from SetUpCommandLine() overrides. When
the override becomes empty, delete the override altogether.

Make a note of this in the comments in content_browser_test.h. Also fix
some lint errors along the way.

Change-Id: I81f263286d72ebdab68dfd9575ad4cf2b6378a3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5691227
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1325736}
2024-07-10 20:59:12 +00:00
Mariam Ali
40020cda88 [Code Health] Add LINT.IfChange to BrowsingData TracingDataType
Since multiline/multipath is currently unsupported; for enums that
require multiple file changes (e.g. histograms.xml and enums.xml) I've
used the following chain:
C++ declaration > enums.xml > histograms.xml > C++ declaration

NO_IFTTT=Adding linter not changing it.

Bug: 348206841
Change-Id: I97f4741f40592c7bd4be32e5de17236acc2bb34c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5645378
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Auto-Submit: Mariam Ali <alimariam@google.com>
Commit-Queue: Mariam Ali <alimariam@google.com>
Cr-Commit-Position: refs/heads/main@{#1320198}
2024-06-27 06:56:11 +00:00
selya
34bfee1517 Align the ancestor chain bit with SameSite attribute behavior
An edge case was discovered where the ancestor chain bit would
be calculated as cross-site when redirecting from a cross-site
resource to a same-site resource. This behavior does not align
with how the SameSite attribute behaves. To reduce developer
confusion, this CL unifies the behavior.

Tests have also been added to confirm the new expected behavior.


Bug: 346610961
Change-Id: I4d5bde5cf2e837bb738d2cb2b5de13bb05395d9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5621955
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Aaron Selya <selya@google.com>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/main@{#1317939}
2024-06-21 14:47:39 +00:00
Sandor Major
faa4f5cae6 Enable DataRemover to delete permissions granted by Related Website Sets
Permissions granted by Related Website Sets (RWS) are going to be
deleted when RWS are changing. This is currently a no-op because
RWS are loaded during startup but permissions granted by RWS are not
persisted. crrev.com/c/5588890 is going to persist RWS grants which will
then be cleared at startup if the RWS change.

Bug: b/338367663
Change-Id: Ib412817bbe0698b55295dc0aa267d97e369f8e1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5597148
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Sandor «Alex» Major <sandormajor@google.com>
Cr-Commit-Position: refs/heads/main@{#1314573}
2024-06-13 15:04:01 +00:00
Ryan Tarpine
06e4558760 Don't clear interest groups when deleting only partitioned cookies.
Bug: 344844565
Change-Id: I166f95f7b3e5ea7b9ff4e2671e5af01c32ead13f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5597178
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1313000}
2024-06-10 20:07:29 +00:00
Nasko Oskov
ee48dfb4fa Prepare to remove //content/ from unsafe_bufers_paths.txt
Suppress unsafe buffer usage on a file-by-file basis.  Out of
approximately 5850 .cc and .h files only roughly 160 files fail
compilation with the unsafe buffers warning.

Suppress only, by inserting boilerplate into affected files. Do not
re-write any code to work around the issues. Properly fixing each file
will be done in follow-up CLs.

//content/ is not removed from unsafe_bufers_paths.txt file and will be
also done as a follow-up, so it makes potential reverts simpler.

Bug: 342213636
Change-Id: I4a936e63dea95a78951f7bfae6d5487708ae3c0b
AX-Relnotes: n/a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608913
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1312393}
2024-06-08 05:13:06 +00:00
Rushan Suleymanov
e50ac01bb8 Revert "BrowsingData: Handle extension deletion with empty origins filter"
This reverts commit 343ee1faca.

Reason for revert: this might cause test failure on several bots:
https://ci.chromium.org/ui/p/chromium/builders/ci/linux-bfcache-rel/60349/overview

Original change's description:
> BrowsingData: Handle extension deletion with empty origins filter
>
> Deletions with an empty list of origins have no effect and trigger a
> DCHECK. Return an error instead.
>
> Bug: 40072785, 339026522
> Change-Id: I9bdc96e66e2327ebe62071d4046a4be59c297a6e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5534764
> Commit-Queue: Christian Dullweber <dullweber@chromium.org>
> Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
> Auto-Submit: Christian Dullweber <dullweber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1309845}

Bug: 40072785, 339026522, 344818282
Change-Id: Idf0b40a2f472f047de05dabdb14d28cacf95de68
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5593976
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rushan Suleymanov <rushans@google.com>
Auto-Submit: Rushan Suleymanov <rushans@google.com>
Owners-Override: Rushan Suleymanov <rushans@google.com>
Cr-Commit-Position: refs/heads/main@{#1309870}
2024-06-04 12:10:37 +00:00
Christian Dullweber
343ee1faca BrowsingData: Handle extension deletion with empty origins filter
Deletions with an empty list of origins have no effect and trigger a
DCHECK. Return an error instead.

Bug: 40072785, 339026522
Change-Id: I9bdc96e66e2327ebe62071d4046a4be59c297a6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5534764
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Auto-Submit: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1309845}
2024-06-04 10:32:41 +00:00
Steven Valdez
321c095755 Add more console errors for Private State Tokens.
Bug: 339207243
Change-Id: Ib25e7fa0a2645d795b1d2044a95a8c9b9d231e17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5571078
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Steven Valdez <svaldez@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Aykut Bulut <aykutb@google.com>
Cr-Commit-Position: refs/heads/main@{#1307993}
2024-05-30 14:41:50 +00:00
Christian Dullweber
af12c3ef71 BrowsingData: Do not delete all origins without filter
Many data deletions are not checking time range or url filters. While
this isn't great, we should prevent at least individual origins from
being able to delete data globally through the Clear-Site-Data header.
These deletions should be skipped instead.

Change-Id: Ia8e0ebe6510fd91ab94b377047a335af0f806459
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5522577
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1302604}
2024-05-17 15:37:40 +00:00
Ryan Tarpine
5ce8f41942 Fix several cases of too much browsing data being deleted by accident.
Some types of storage don't support filtering and want to clear
themselves whenever "most" browsing data is being deleted.

It used to be the case that if BrowsingDataFilterBuilder::GetMode()
returned kPreserve, you could assume that almost all origins/domains
would be matched by the filter. Thanks to storage partitioning, that's
no longer true. There are now additional properties that restrict what
hosts are matched, and if you ignore them, then some storage will clear
all their data when only one host should be affected.

Add a new method to BrowsingDataFilterBuilder:
MatchesMostOriginsAndDomains().

Replace uses of BrowsingDataFilterBuilder::GetMode() == kPreserve with
calls to the new method.

Bug: 339385533
Change-Id: Ia040056b67ca616e1cd72d058bb80c86447258f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5527934
Reviewed-by: Jonathan Njeunje <njeunje@chromium.org>
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301994}
2024-05-16 16:09:30 +00:00
Peter Boström
8472105d01 Use NOTREACHED_IN_MIGRATION() in content/
This was generated by replacing "  NOTREACHED()" with
"  NOTREACHED_IN_MIGRATION()" and running git cl format.

This prepares for making NOTREACHED() [[noreturn]] alongside
NotReachedIsFatal migration of existing inventory.

Bug: 40580068
Change-Id: I3b48b89911ac5e9ffcb211622992f917f8f9e8d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5539619
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301096}
2024-05-15 04:36:02 +00:00
selya
d1565b1d12 Add new parameter to CookiePartitionKey::FromNetworkIsolationKey
The current implementation of the Cookie partition key with the ancestor chain bit included can generate a cross-site key even when the site is the top-level site and should not have any ancestor. To address this, a new parameter, main_frame_navigation has been added to ensure that main frame's always create a same_site key.

The test coverage associated with this change is in linked CL https://chromium-review.googlesource.com/c/chromium/src/+/5512042

Bug: 339410000
Change-Id: Ifcaff07afec4d7ff48e99b5422e19ed7a0940c76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526495
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: mmenke <mmenke@chromium.org>
Auto-Submit: Aaron Selya <selya@google.com>
Reviewed-by: Brianna Goldstein <brgoldstein@google.com>
Reviewed-by: Garrett Tanzer <gtanzer@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Aaron Selya <selya@google.com>
Cr-Commit-Position: refs/heads/main@{#1299420}
2024-05-10 19:06:15 +00:00
Alison Gale
770f3fce37 Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:

- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)

Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.

#crbug-todo-migration

Bug: b/321899722
Change-Id: Ibc66b8c440e4bcdef414e77fef4d9874d2ea9951
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5493800
Auto-Submit: Alison Gale <agale@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1293330}
2024-04-27 00:39:58 +00:00
Alison Gale
81f4f2c793 Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:

- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)

Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.

#crbug-todo-migration

Bug: b/321899722
Change-Id: Iee14d10d544e9f0ec046117cc4ec8a55c427adc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5469947
Reviewed-by: Darryl James <dljames@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290838}
2024-04-22 19:33:31 +00:00
Alison Gale
d94ce4fa45 Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:

- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)

Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.

#crbug-todo-migration

Bug: b/321899722
Change-Id: Iebe070b9ed793ecdfc43c3a3570f1808b7ddd221
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5470014
Reviewed-by: Darryl James <dljames@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290677}
2024-04-22 15:20:39 +00:00
Alison Gale
59c007a7ad Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:

- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)

Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.

#crbug-todo-migration

Bug: b/321899722
Change-Id: Ifd155bbeff882ea939f74cf8b8f847f42847940b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5468156
Reviewed-by: Darryl James <dljames@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290297}
2024-04-20 03:05:40 +00:00
Alison Gale
47d1537de7 Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:

- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)

Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.

#crbug-todo-migration

Bug: b/321899722
Change-Id: Ieeb461e2d489e86fd50b87a2a0721a2be34520c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5467317
Owners-Override: Alison Gale <agale@chromium.org>
Commit-Queue: Darryl James <dljames@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Reviewed-by: Darryl James <dljames@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290198}
2024-04-19 21:31:46 +00:00
selya
0320453eed Update tests to address the inclusion of an ancestor chain bit in partitioned cookies
An ancestor chain bit is being added to the key associated with the CookiePartitionKey class.
This change causes several tests to break because the expected values are no longer correct.
This CL updates those tests to  have the correct value when the feature controlling the ancestor
chain bit is enabled.

Bug: 331596260
Change-Id: I013fd25da34907afce43c596f7d5951805dd08c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5428454
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Aaron Selya <selya@google.com>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Auto-Submit: Aaron Selya <selya@google.com>
Cr-Commit-Position: refs/heads/main@{#1285380}
2024-04-10 20:31:54 +00:00
Ari Chivukula
92851c3c72 [cookies] Remove defaults from CanonicalCookie::Create
There is a confusing pattern of defaults on cookie constructors, and
this is somewhat dangerous as we do not want cookies to be created in
production code without all values being explicitly set (especially as
new values are added). Tests can use the new CreateForTesting if they
want kind defaults.

Bug: 332939148
Change-Id: Id628aa619e34d7244dadaede705374ac2310da14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5424827
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Denis Kuznetsov <antrim@chromium.org>
Reviewed-by: Andy Paicu <andypaicu@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Theodore Olsauskas-Warren <sauski@google.com>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Mohammed Abdon <mohammedabdon@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Max Curran <curranmax@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1284411}
2024-04-09 12:37:44 +00:00
Ryan Tarpine
165b182c3c BrowsingDataFilterBuilder: Replace IsCrossSiteClearSiteDataForCookies().
Rename SetPartitionedStateAllowedOnly() to SetPartitionedCookiesOnly().

Replace IsCrossSiteClearSiteDataForCookies() with
PartitionedCookiesOnly().

Bug: 331733538
Change-Id: I827b460fb12e09d6c158aaa9d22c32cb68cdaac6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5372996
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1283933}
2024-04-08 17:51:58 +00:00
Lei Zhang
bda6288d5f Remove base::EnumSet::Empty() and Size()
Replace with empty() and size(), respectively. The lowercase method
names work better with templated code that expects classes to have
size(), similar to STL containers.

Fix a typo along the way.

Change-Id: I42250eac4ac98e7a9973c6814fc8f4d18e389863
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5405774
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1280409}
2024-03-29 23:16:03 +00:00
selya
8b49361364 Add ancestor chain to partition key and update call sites and tests
This is the initial implementation of the ancestor chain bit addition to the cookie partition key.

The unit tests associated with the partition key have also been added and/or updated accommodate the new value.

For all the methods with parameters added to them, they have been given default values so that preexisting code will be able to work with them. This was done to allow for the wide spread changes to the codebase to be broken up into smaller CLs and after all those land another CL to address https://crbug.com/325439525, will be used to change the methods to require values be passed.

Bug: 41486025
Bug: 325439525
Change-Id: I9f0fec7dc4bee44031c5e80648e451d2fa733628
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5296867
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Commit-Queue: Aaron Selya <selya@google.com>
Cr-Commit-Position: refs/heads/main@{#1280278}
2024-03-29 18:54:31 +00:00
Avi Drissman
88f6267eee Use HeapArray for content/browser/browsing_data
Fixed: 326458556
Change-Id: Id8e6473849519742f343bdd703c5b3992ac053e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5400749
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1279744}
2024-03-28 17:05:20 +00:00
Ryan Tarpine
067b2c843e Update BrowsingDataFilterBuilderImpl::Copy() and IsEqual().
Copy() and IsEqual() were not taking into account fields later added to
BrowsingDataFilterBuilderImpl, so copies would not behave the same as
the originals, and some distinct filters could compare equal.

Bug: 329233136
Change-Id: Ie65fc15e81e5378b845246b6c8da171fb3a08ea8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5369831
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/main@{#1278318}
2024-03-26 15:01:38 +00:00
Ryan Tarpine
a664d1ae65 Make MatchesAllOriginsAndDomains return false for partition restrictions
Many places use an optimized "return true" callback instead of a full
storage matching implementation when MatchesAllOriginsAndDomains()
returns true. But it could return true even when several storage
partitioning restrictions were set on the filter, leading to deleting
more storage than intended.

This CL makes MatchesAllOriginsAndDomains() return false if any such
restrictions are set.

Bug: 328710570
Change-Id: Idcd501c0e1a04893713bb284990a6e78c3229234
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5381507
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1278277}
2024-03-26 13:40:56 +00:00
Ryan Tarpine
d29d61762b BrowsingDataFilterBuilder: Make OriginMatchingMode apply to domains.
Bug: 327473681, 328710570
Change-Id: I75c0e934bfba2a7d2c25a6021cfc921e3e6c791f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5372908
Reviewed-by: Joshua Hood <jdh@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1276974}
2024-03-22 17:50:52 +00:00
Matt Menke
f27e0d2b03 Remove use of URLRequest from ClearSiteDataHandlerTests.
They were creating an entire, function instance of Chrome's network
stack just to create a request and grab net::LOAD_NORMAL from its
load flags, and never sending the request, which seems not useful.
URLRequests aren't even created in the same process in production
any more.

This code was likely left over from before the servicification of the
network stack.

Bug: None
Change-Id: I05caf3dcfd5b8995c9f8c0534a46056015bd633a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5381419
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1275503}
2024-03-20 12:24:47 +00:00
Ryan Tarpine
8c14e77bb4 Remove one nullptr return from BuildNetworkServiceFilter().
BrowsingDataFilterBuilderImpl::BuildNetworkServiceFilter() currently
returns nullptr whenever the filter's cookie partition key collection
has been set. This effectively makes it a "match everything" filter.

This CL simply removes that case. It still doesn't behave correctly when
the collection has been set, but it's better than before (it no longer
matches all domains and origins).

Bug: 329705715
Change-Id: Id1eb968bb7febfb79b6586277cde7499e1ecd332
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5377290
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1274993}
2024-03-19 16:48:12 +00:00
Joshua Bell
bf23c6caec Add ayiu@ to browsing_data/OWNERS
... and retire jsbell@

Change-Id: I8c186c19049182d803a3a4ff12f9fe0725fc1ce9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5328613
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1266774}
2024-02-29 01:30:35 +00:00
Takuto Ikuta
a47d7859c4 autofill: remove unnecessary include from browser_test_base.h
This is extracted from https://crrev.com/c/5280997 to reduce compile
time of some test files.

content/public/test/browser_test_base.h is the file removing
unnecessary header.

Bug: b/324519459
Change-Id: Ic6b8e4328f6be3161dd3f09711451c8578032ef4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5300036
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262233}
2024-02-19 03:46:58 +00:00
Dylan Cutler
9f9b4d2998 Remove kPartitionedCookies feature from browsing data tests
The feature has been enabled by default since M114.

Bug: 324456212
Change-Id: I06885ea2e50021270ee0bbdcc3761c6886fe8da9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292740
Auto-Submit: Dylan Cutler <dylancutler@google.com>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1260354}
2024-02-14 09:54:17 +00:00
Camillia Smith Barnes
e5c7ef02f9 Shared Storage: Migrate database to track bytes used per origin
We migrate the shared storage SQLite database to version 5, which adds
a `num_bytes` column to the `per_origin_mapping` table. This will
track the total number of bytes stored in keys and values in the
`values_mapping` table by the associated origin.

We update several database methods in order to maintain the new
`num_bytes` column, and fix tests as necessary.

A follow-up CL (https://crrev.com/c/5280364) will add methods to query
the `num_bytes` column. At that point we will add more unit tests to
more thoroughly verify that the updates to database methods are working
as intended.

 shared_storage_database_migrations.cc are executed only if a
 `sql::Database` error occurs. To force database errors, we would
 need to mock the `sql::Database` class, which currently doesn't
 have any virtual methods.

Low-Coverage-Reason: HARD_TO_TEST The uncovered lines in
Bug: 324464353,1218540
Change-Id: I02eb9a44b78fc7e5e573704e78d0eb08c4a412c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5278559
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1259365}
2024-02-12 19:38:21 +00:00
Jeff Yoon
d1328c4408 [buganizer] Migrate DIR_METADATA in content/browser/
Migrate all metadata files for content/browser.

Verify components with http://b/components/{id} or at
go/chrome-on-buganizer-prod-components.

Bug: chromium:1518875
Change-Id: I555b9fe40952a5707e167b3dcbaf2858bbdf1f34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5284095
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1258966}
2024-02-11 19:24:26 +00:00
Marijn Kruisselbrink
54d9d79f0b Disable DCHECK in browser_data_filter_builder_impl.cc
Per the linked bug other people have hit this DCHECK, and I'm
currently consistently hitting this DCHECK from simply trying to
navigate. We should not have DCHECKs in the code that aren't
actually correct.

Bug: 1420402
Change-Id: I6225826c330226c232ddd3c452a12014b82348df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5263008
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1255843}
2024-02-03 00:21:51 +00:00
Nick Burris
60e485a67b Remove default argument from SharedStorageManager::Set
Removes the default parameter so that the function can be made virtual
in a following patch.

Bug: 1523750
Change-Id: Ieebe1c0b26f0d5f0cad0f76254a4e7c7493a01c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5254660
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Nick Burris <nburris@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1255110}
2024-02-01 17:08:34 +00:00
Sonja
ae009ec77e [CodeHealth] Use base::test::RunUntil instead of while+run_loop combo
Modernize browsertests to use `base::test::RunUntil`.

Bug: 1519130
Change-Id: I29b967b414c234fe2221cf21d56b037a63c6c653
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5205190
Reviewed-by: Christian Flach <cmfcmf@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Sonja Laurila <laurila@google.com>
Cr-Commit-Position: refs/heads/main@{#1255012}
2024-02-01 13:33:22 +00:00
Erik Chen
24c4f8893c Clean up StoragePartitionImpl. Part 1.
This CL is a refactor with no intended behavior change.

This CL replaces usage of web_contents_getter and browser_context_getter
with WeakPtrs in several content classes. This removes several potential
sources of UaFs.

Change-Id: I831c3f51730386146433726ce5f3efba08288616
Bug: 1371177
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5208248
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1249178}
2024-01-19 01:30:46 +00:00
Arthur Sonzogni
c686e8f4fd Rename {absl => std}::optional in //content/
Automated patch, intended to be effectively a no-op.

Context:
https://groups.google.com/a/chromium.org/g/cxx/c/nBD_1LaanTc/m/ghh-ZZhWAwAJ?utm_medium=email&utm_source=footer

As of https://crrev.com/1204351, absl::optional is now a type alias for
std::optional. We should migrate toward it.

Script:
```
function replace {
  echo "Replacing $1 by $2"
  git grep -l "$1" \
    | cut -f1 -d: \
    | grep \
      -e "^content" \
    | sort \
    | uniq \
    | grep \
      -e "\.h" \
      -e "\.cc" \
      -e "\.mm" \
      -e "\.py" \
    | xargs sed -i "s/$1/$2/g"
}
replace "absl::make_optional" "std::make_optional"
replace "absl::optional" "std::optional"
replace "absl::nullopt" "std::nullopt"
replace "absl::in_place" "std::in_place"
replace "absl::in_place_t" "std::in_place_t"
replace "\"third_party\/abseil-cpp\/absl\/types\/optional.h\"" "<optional>"
git cl format
```

# Skipping unrelated "check_network_annotation" errors.
NOTRY=True

Bug: chromium:1500249
Change-Id: Icfd31a71d8faf63a2e8d5401127e7ee74cc1c413
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5185537
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245739}
2024-01-11 08:36:37 +00:00
Maks Orlovich
464867a882 Fix FlakyDanglingUntriaged in *::ConditionalCacheDeletionHelper
(Unfortunately, this class is largely duplicated)

The content/ version needs an ExtractAsDangling() when closing the entry; unfortunately I can't reproduce the failure to confirm.

The services/network already had it, and it looks like the annotation was added to it by mistake --- the test mentioned uses the content/ version, not services/network one.

Change-Id: I302bff5a13253a126bf93c7e84970332755e4205
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5137949
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1240287}
2023-12-21 20:15:49 +00:00