Skip to content

Commit

Permalink
[Merge 116] Settings: Fix runtime error for PrivacySandboxSettings4
Browse files Browse the repository at this point in the history
The error was thrown after exiting the chrome://settings/cookies page,
in the codepath that looks for the entry point to restore focus to.

(cherry picked from commit 085310d)

Fixed: 1457729
Change-Id: Ie5060c0b2c730a5080df98efdcf594a419682c48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4655255
Reviewed-by: Theodore Olsauskas-Warren <sauski@google.com>
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Theodore Olsauskas-Warren <sauski@google.com>
Cr-Original-Commit-Position: refs/heads/main@{#1163999}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4660445
Auto-Submit: Theodore Olsauskas-Warren <sauski@google.com>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/branch-heads/5845@{#259}
Cr-Branched-From: 5a5dff6-refs/heads/main@{#1160321}
  • Loading branch information
freshp86 authored and Chromium LUCI CQ committed Jun 30, 2023
1 parent 553de33 commit df82568
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions chrome/browser/resources/settings/privacy_page/privacy_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase {
}

if (routes.COOKIES) {
map.set(
`${routes.COOKIES.path}_${routes.PRIVACY.path}`,
'#cookiesLinkRow');
map.set(
`${routes.COOKIES.path}_${routes.BASIC.path}`,
'#cookiesLinkRow');
const selector =
loadTimeData.getBoolean('isPrivacySandboxSettings4') ?
'#thirdPartyCookiesLinkRow' :
'#cookiesLinkRow';
map.set(`${routes.COOKIES.path}_${routes.PRIVACY.path}`, selector);
map.set(`${routes.COOKIES.path}_${routes.BASIC.path}`, selector);
}

if (routes.SITE_SETTINGS) {
Expand Down

0 comments on commit df82568

Please sign in to comment.