From e4b72f61f7e6290c0f8d3b00839dc32e5542aac6 Mon Sep 17 00:00:00 2001 From: Shuran Huang Date: Tue, 7 Jan 2025 13:28:12 +0000 Subject: [PATCH] Handle Grace period exceptions that are applied at the 1p level Bug: b/382264360 Change-Id: Ie61254dba7feb6a08ffefcf063e99766d58f5ddc Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6148734 Auto-Submit: Shuran Huang Reviewed-by: Wolfgang Beyer Commit-Queue: Shuran Huang --- front_end/panels/security/CookieReportView.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/front_end/panels/security/CookieReportView.ts b/front_end/panels/security/CookieReportView.ts index 7bf0c21e633..db9674b5082 100644 --- a/front_end/panels/security/CookieReportView.ts +++ b/front_end/panels/security/CookieReportView.ts @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import type * as Common from '../../core/common/common.js'; +import * as Common from '../../core/common/common.js'; import * as i18n from '../../core/i18n/i18n.js'; import * as SDK from '../../core/sdk/sdk.js'; import * as Protocol from '../../generated/protocol.js'; @@ -451,8 +451,11 @@ export class CookieReportView extends UI.Widget.VBox { })}`; } case Protocol.Audits.InsightType.GracePeriod: { + const url = SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inspectedURL(); const gracePeriodLink = UI.XLink.XLink.create( 'https://developers.google.com/privacy-sandbox/cookies/dashboard?url=' + + // The order of the URLs matters - needs to be 1P + 3P. + (url ? Common.ParsedURL.ParsedURL.fromString(url)?.host + '+' : '') + (domain.charAt(0) === '.' ? domain.substring(1) : domain), i18nString(UIStrings.reportedIssues), undefined, undefined, 'compatibility-lookup-link');