Following the successful deployment of the feature
kAncestorChainBitEnabledInPartitionedCookies being enabled by default
and metrics showing that there is no longer usage of users disabling it.
Usages of the flag are being removed and all code that utilized the
feature is being refactored to reflect a state in which the feature is
enabled.
OBSOLETE_HISTOGRAM[Cookie.FirstPartyPartitioned.HasCrossSiteAncestor]=
Feature that metric was tracking has been removed.
Bug: 328043119
Change-Id: Ifc0ccfba6cbac610c3c26370c0393b4a005fbbbb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6316346
Reviewed-by: Steven Bingler <bingler@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Auto-Submit: Aaron Selya <selya@google.com>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Aaron Selya <selya@google.com>
Reviewed-by: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1427719}
JS metrics are being skewed by parsing errors in the Clear-Site-Data
header. It's reasonable to bump these down to warnings since
they are basically notices that a header was ignored.
Bug: 399862589
Change-Id: I9298899d58e27d29b82275b50d01e240595faf76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6311715
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426550}
This change removes some usages of StorageType in QuotaManagerProxy.
After StorageType::kSyncable deprecation, all other storage types
except kTemporary are deprecated. So we no longer need to specify
StorageType. Further cleanup to remove usage from QuotaManager,
QuotaDatabase, etc. will follow.
Bug: 40211051
Change-Id: Iba5caa5aefcc346cbcf9e7aac3f05ab33ca53d61
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6306646
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426466}
This change removes some usages of StorageType from
QuotaManagerProxy. All other StorageTypes except
StorageType::kTemporary have been deprecated. Therefore
no longer need to pass this value around. Further cleanup
to remove usages from
QuotaManagerProxy/QuotaManager/QuotaDatabase will follow.
Bug: 40211051
Change-Id: I0aa5413fc6ced600d25ad446ec0281fbd1181074
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6279419
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Ming-Ying Chung <mych@chromium.org>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1424923}
This change cancels all the existing prerenders when browsing data
removal is run on cached data. This can be triggered by the Delete Browsing Data option or with Clear-Site-Data response headers. Developer Tools will now also show the previously successful prerender(s) as failed. A new PrerenderFinalStatus is added specifically for this case.
nav-speculation spec PR: https://github.com/WICG/nav-speculation/pull/361
NO_IFTTT=Changes for PrerenderFinalStatus will be done in separate repositories.
Bug: 40262311
Change-Id: Ie82895e555f3a9d4e2576686223e67443d198353
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6173154
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Steven Wei <stevenwei@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1419494}
This also renames the "user interaction" columns in the DIPS database.
We avoid changing references to interaction that legitimately refer to
both user activations and webauthn assertions, and navigationflow naming
is unchanged to maintain consistency with the UKM naming.
Bug: 371304526
Change-Id: I2cccf0701a51c6653f1ad4baa92d61b6051315ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6176303
Reviewed-by: Elias Klim <elklm@chromium.org>
Commit-Queue: Andrew Liu <liu@chromium.org>
Reviewed-by: Svend Larsen <svend@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Ryan Tarpine <rtarpine@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1410696}
This CL fixes or disables tests that break when
HstsTopLevelNavigationsOnly is enabled.
NetworkContextConfigurationBrowserTest.*Hsts needed to use a main frame
IsolationInfo to signify a top-level navigation.
ExtensionWebRequestApiTestWithContextType*.ExtraHeadersWithHSTSUpgrade
&
WebSocketBrowserTest*.*WebSocketAppliesHSTS
depended upon HSTS upgrades for sub-resource requests, so they were
modified to only run with the feature disabled.
ChromeNavigationBrowserTest.ErrorPageDoesNotInheritCSP seemingly has
unintentionally depended on HSTS for a while now. The fake site,
invalid.foo, gets HSTS upgraded, due to foo being on the HSTS preload list, which results in an error as the embedded server doesn't support
HTTPS. When HstsTopLevelNavigationsOnly is enabled the iframe doesn't
get upgraded and so the request for http://invalid.foo gets serviced by
the lighttpd server which returns a 403 forbidden error. Since this
isn't the error the test was expecting it fails as a result. So the
test, and it's data page, are updated so the iframe requests
https://invalid.test.
BrowsingDataRemoverImplBrowserTest.ClearTransportSecurityState
&
BrowsingDataRemoverImplBrowserTest.PreserveTransportSecurityState
needed to use a main frame IsolationInfo in their helper function.
NetworkContextIncludeRequestCookiesWithResponseTest.
HSTSRedirectClearsCookie
had a URLLoaderFactory that indicated an internal request. This was
removed and the request itself was given a main frame IsolationInfo.
The change necessary to fix
DevToolsTest.TestRawHeadersWithRedirectAndHSTS is in the DevTools repo
and will be fixed in another CL.
Bug: 40725781
Change-Id: I1f807e0e72443375f91d895bfa06ffe3b19f5a38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5868542
Commit-Queue: Steven Bingler <bingler@chromium.org>
Reviewed-by: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1407958}
This reverts commit 4d4b33ce5c.
Reason for revert: Tree closure for compile failure
Original change's description:
> [DIPS] Rename DIPS prefix to Btm.
>
> This makes it match the external name (Bounce Tracking Mitigations) and
> comply with the C++ style guide, which says "prefer to capitalize
> abbreviations as single words".
>
> A followup CL will rename filename prefixes from dips_ to btm_ (and the
> directories from dips/ to btm/).
>
> Bug: 388538934
> Change-Id: I43d3f1c24632919ac8985aea5b7f2d945d2a9628
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6172859
> Owners-Override: Avi Drissman <avi@chromium.org>
> Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1406975}
Bug: 388538934
Change-Id: Ic86e19c9c3a23d7dcb014bab5bc6bc13419a0ae0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6173773
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Joey Arhar <jarhar@chromium.org>
Owners-Override: Joey Arhar <jarhar@google.com>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1406979}
This makes it match the external name (Bounce Tracking Mitigations) and
comply with the C++ style guide, which says "prefer to capitalize
abbreviations as single words".
A followup CL will rename filename prefixes from dips_ to btm_ (and the
directories from dips/ to btm/).
Bug: 388538934
Change-Id: I43d3f1c24632919ac8985aea5b7f2d945d2a9628
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6172859
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1406975}
Move ShouldDeleteInteractionRecords() from DipsDelegate to
ContentBrowserClient, renaming it ShouldDipsDeleteInteractionRecords().
Now that there are no methods left on DipsDelegate, delete it (and
ChromeDipsDelegate).
Bug: 387281262
Change-Id: I020b806a1526a46095425a0a637ec273ca50b4f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6142815
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Reviewed-by: Joshua Hood <jdh@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1404371}
This reverts commit 5783b19dd0.
Reason for revert: Fix failing bot.
Original change's description:
> Revert "[DIPS] Move from //chrome to //content."
>
> This reverts commit 8915d9509c.
>
> Reason for revert:
> https://ci.chromium.org/ui/p/chromium/builders/ci/linux-cast-x64-rel/6859/overview
>
> Original change's description:
> > [DIPS] Move from //chrome to //content.
> >
> > By moving DIPS (Bounce Tracking Mitigations) into //content, it will be
> > available for all content embedders, such as Android WebView.
> >
> > Aside from the obvious file moves, the main changes are:
> > - DIPS-related WebContentsObservers are created in
> > WebContentsImpl::Init() instead of TabHelpers::AttachTabHelpers()
> > - No more DIPSServiceFactory: BrowserContextImpl creates and owns the
> > DIPSServiceImpl directly
> > - No more DIPSCleanupService (nor its factory): BrowserContextImpl
> > deletes the DIPS database file if necessary
> > - The logic to trigger DIPS data deletion moved from
> > ChromeBrowsingDataRemoverDelegate to BrowsingDataRemoverImpl
> > - Tests have to override the ContentBrowserClient instead of setting
> > prefs and modifying the HostContentSettingsMap to test 3PC behavior
> > - The OpenerHeuristicService was split into two pieces: the part that
> > creates cookie grants was moved into //content as the new method
> > BrowserContext::BackfillPopupHeuristicGrants(); and the part that
> > observes the tracking protection settings stays in //chrome and calls
> > that method.
> > - Many FeatureParams were moved from tpcd_experiment_features.h in
> > //chrome to //components/content_settings/core/common/features.h
> > - components/content_settings/core/common was added to content/DEPS
> > - Renamed SiteDataAccessType to DIPSDataAccessType
> >
> > In followup CLs, we will
> > (1) Put all of the DIPS classes, functions, etc into the content namespace (crrev.com/c/6039087)
> > (2) Rename DIPS prefixes to Dips to comply with the style guide
> > (3) Change b/ bug references to crbug.com/
> > (4) Delete DipsDelegate, moving its methods to ContentBrowserClient
> >
> > Bug: 40883201
> > Change-Id: I3c07e867ae00e6817ff286a71722473c08ead624
> > Fuchsia-Binary-Size: Size increase is unavoidable - moving feature from //chrome to //content
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6000406
> > Reviewed-by: Avi Drissman <avi@chromium.org>
> > Reviewed-by: Joshua Hood <jdh@chromium.org>
> > Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
> > Reviewed-by: Adam Langley <agl@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1399855}
>
> Bug: 40883201
> Change-Id: I7c74ccf088a40075dd2134d855dc4ad5ea08ae58
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6117354
> Owners-Override: Owen Min <zmin@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Owen Min <zmin@chromium.org>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#1399859}
Bug: 40883201
Change-Id: If191568901b803a8c4d1daebab27a295cbe38a0e
Fuchsia-Binary-Size: Size increase is unavoidable - moving feature from //chrome to //content
Cq-Include-Trybots: luci.chromium.try:linux-cast-x64-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6121689
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Joshua Hood <jdh@chromium.org>
Reviewed-by: Adam Langley <agl@chromium.org>
Owners-Override: Ryan Tarpine <rtarpine@chromium.org>
Reviewed-by: Mike Wasserman <msw@chromium.org>
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1400362}
This reverts commit 8915d9509c.
Reason for revert:
https://ci.chromium.org/ui/p/chromium/builders/ci/linux-cast-x64-rel/6859/overview
Original change's description:
> [DIPS] Move from //chrome to //content.
>
> By moving DIPS (Bounce Tracking Mitigations) into //content, it will be
> available for all content embedders, such as Android WebView.
>
> Aside from the obvious file moves, the main changes are:
> - DIPS-related WebContentsObservers are created in
> WebContentsImpl::Init() instead of TabHelpers::AttachTabHelpers()
> - No more DIPSServiceFactory: BrowserContextImpl creates and owns the
> DIPSServiceImpl directly
> - No more DIPSCleanupService (nor its factory): BrowserContextImpl
> deletes the DIPS database file if necessary
> - The logic to trigger DIPS data deletion moved from
> ChromeBrowsingDataRemoverDelegate to BrowsingDataRemoverImpl
> - Tests have to override the ContentBrowserClient instead of setting
> prefs and modifying the HostContentSettingsMap to test 3PC behavior
> - The OpenerHeuristicService was split into two pieces: the part that
> creates cookie grants was moved into //content as the new method
> BrowserContext::BackfillPopupHeuristicGrants(); and the part that
> observes the tracking protection settings stays in //chrome and calls
> that method.
> - Many FeatureParams were moved from tpcd_experiment_features.h in
> //chrome to //components/content_settings/core/common/features.h
> - components/content_settings/core/common was added to content/DEPS
> - Renamed SiteDataAccessType to DIPSDataAccessType
>
> In followup CLs, we will
> (1) Put all of the DIPS classes, functions, etc into the content namespace (crrev.com/c/6039087)
> (2) Rename DIPS prefixes to Dips to comply with the style guide
> (3) Change b/ bug references to crbug.com/
> (4) Delete DipsDelegate, moving its methods to ContentBrowserClient
>
> Bug: 40883201
> Change-Id: I3c07e867ae00e6817ff286a71722473c08ead624
> Fuchsia-Binary-Size: Size increase is unavoidable - moving feature from //chrome to //content
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6000406
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Joshua Hood <jdh@chromium.org>
> Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
> Reviewed-by: Adam Langley <agl@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1399855}
Bug: 40883201
Change-Id: I7c74ccf088a40075dd2134d855dc4ad5ea08ae58
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6117354
Owners-Override: Owen Min <zmin@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Owen Min <zmin@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1399859}
By moving DIPS (Bounce Tracking Mitigations) into //content, it will be
available for all content embedders, such as Android WebView.
Aside from the obvious file moves, the main changes are:
- DIPS-related WebContentsObservers are created in
WebContentsImpl::Init() instead of TabHelpers::AttachTabHelpers()
- No more DIPSServiceFactory: BrowserContextImpl creates and owns the
DIPSServiceImpl directly
- No more DIPSCleanupService (nor its factory): BrowserContextImpl
deletes the DIPS database file if necessary
- The logic to trigger DIPS data deletion moved from
ChromeBrowsingDataRemoverDelegate to BrowsingDataRemoverImpl
- Tests have to override the ContentBrowserClient instead of setting
prefs and modifying the HostContentSettingsMap to test 3PC behavior
- The OpenerHeuristicService was split into two pieces: the part that
creates cookie grants was moved into //content as the new method
BrowserContext::BackfillPopupHeuristicGrants(); and the part that
observes the tracking protection settings stays in //chrome and calls
that method.
- Many FeatureParams were moved from tpcd_experiment_features.h in
//chrome to //components/content_settings/core/common/features.h
- components/content_settings/core/common was added to content/DEPS
- Renamed SiteDataAccessType to DIPSDataAccessType
In followup CLs, we will
(1) Put all of the DIPS classes, functions, etc into the content namespace (crrev.com/c/6039087)
(2) Rename DIPS prefixes to Dips to comply with the style guide
(3) Change b/ bug references to crbug.com/
(4) Delete DipsDelegate, moving its methods to ContentBrowserClient
Bug: 40883201
Change-Id: I3c07e867ae00e6817ff286a71722473c08ead624
Fuchsia-Binary-Size: Size increase is unavoidable - moving feature from //chrome to //content
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6000406
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Joshua Hood <jdh@chromium.org>
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Reviewed-by: Adam Langley <agl@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399855}
This is a reland of commit 393033a0c6
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: Ib27a27c761d70a438feddcda6f95636e9456e59c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6066301
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Auto-Submit: Peter Pakkenberg <pbirk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1391111}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}