Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SafetyCheck] Add entry points for unused websites.
This CL adds entry point for safety check unused permissions module. A row will be added to safety checks together with a button that routes to site settings. The strings are TBD, so here the dummy strings are used. For now, the entry point will be visible if SafetyCheckPermissions flag is enabled. However, the triggering mechanism to show unused permissions will be update in following CLs. Screenshot: https://screenshot.googleplex.com/83DfXrPsb4fUMdQ UX deck: https://docs.google.com/presentation/d/1O3MsXYPcGEtgDW42zDjCweDnU8hsnRZvYt_aOfbycek/edit?resourcekey=0-fuBJewxgoJh3cwPq-eBXJg#slide=id.g135e69f8a99_6_9 Bug: 1345920 Change-Id: Iab369e23a5a876182777dd7bd0cb5371556cee24 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3779882 Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org> Cr-Commit-Position: refs/heads/main@{#1032503}
- Loading branch information
Side Yilmaz
authored and
Chromium LUCI CQ
committed
Aug 8, 2022
1 parent
05b6bd3
commit 1513018
Showing
14 changed files
with
255 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...me/browser/resources/settings/safety_check_page/safety_check_unused_site_permissions.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<settings-safety-check-child | ||
id="safetyCheckChild" | ||
icon-status="[[iconStatus_]]" | ||
label="$i18n{safetyCheckUnusedSitePermissionsPrimaryLabel}" | ||
button-label="$i18n{safetyCheckReview}" | ||
button-aria-label="$i18n{safetyCheckReview}" | ||
on-button-click="onButtonClick_" | ||
role="presentation"> | ||
</settings-safety-check-child> |
67 changes: 67 additions & 0 deletions
67
chrome/browser/resources/settings/safety_check_page/safety_check_unused_site_permissions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// Copyright 2022 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/** | ||
* @fileoverview | ||
* 'settings-safety-unused-site-permissions' is the settings page containing the | ||
* safety check unused site permissions module showing the unused sites that has | ||
* some granted permissions. | ||
*/ | ||
|
||
import './safety_check_child.js'; | ||
|
||
import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; | ||
|
||
import {routes} from '../route.js'; | ||
import {Router} from '../router.js'; | ||
|
||
import {SafetyCheckIconStatus} from './safety_check_child.js'; | ||
import {getTemplate} from './safety_check_unused_site_permissions.html.js'; | ||
|
||
export interface SettingsSafetyCheckUnusedSitePermissionsElement { | ||
$: { | ||
'safetyCheckChild': SettingsSafetyCheckUnusedSitePermissionsElement, | ||
}; | ||
} | ||
|
||
export class SettingsSafetyCheckUnusedSitePermissionsElement extends | ||
PolymerElement { | ||
static get is() { | ||
return 'settings-safety-check-unused-site-permissions'; | ||
} | ||
|
||
static get template() { | ||
return getTemplate(); | ||
} | ||
|
||
static get properties() { | ||
return { | ||
iconStatus_: { | ||
type: SafetyCheckIconStatus, | ||
value() { | ||
return SafetyCheckIconStatus.WARNING; | ||
}, | ||
}, | ||
}; | ||
} | ||
|
||
private iconStatus_: SafetyCheckIconStatus; | ||
|
||
private onButtonClick_() { | ||
Router.getInstance().navigateTo( | ||
routes.SITE_SETTINGS, /* dynamicParams= */ undefined, | ||
/* removeSearch= */ true); | ||
} | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'settings-safety-check-unused-site-permissions': | ||
SettingsSafetyCheckUnusedSitePermissionsElement; | ||
} | ||
} | ||
|
||
customElements.define( | ||
SettingsSafetyCheckUnusedSitePermissionsElement.is, | ||
SettingsSafetyCheckUnusedSitePermissionsElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.