Settings WebUI: hides several items on Security page.
- Password leak detection toggle - Safe browsing reporting toggle. - Google Advanced Protection link.
This commit is contained in:
committed by
Max Karolinskiy
parent
0e9defa757
commit
0d70c07917
@@ -19,6 +19,7 @@ import './import_data_dialog.js'
|
||||
import './page_visibility.js'
|
||||
import './payments_section.js'
|
||||
import './people_page.js'
|
||||
import './security_page.js'
|
||||
import './settings_menu.js'
|
||||
import './settings_section.js'
|
||||
import './settings_ui.js'
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2020 The Brave Authors. All rights reserved.
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// you can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import {RegisterPolymerTemplateModifications} from 'chrome://brave-resources/polymer_overriding.js'
|
||||
|
||||
RegisterPolymerTemplateModifications({
|
||||
'settings-security-page': (templateContent) => {
|
||||
const safeBrowsingReportingToggle = templateContent.getElementById('safeBrowsingReportingToggle')
|
||||
if (!safeBrowsingReportingToggle) {
|
||||
console.error('[Brave Settings Overrides] Could not find safeBrowsingReportingToggle id on security page.')
|
||||
} else {
|
||||
safeBrowsingReportingToggle.setAttribute('hidden', 'true')
|
||||
}
|
||||
const passwordsLeakToggle = templateContent.getElementById('passwordsLeakToggle')
|
||||
if (!passwordsLeakToggle) {
|
||||
console.error('[Brave Settings Overrides] Could not find passwordsLeakToggle id on security page.')
|
||||
} else {
|
||||
passwordsLeakToggle.setAttribute('hidden', 'true')
|
||||
}
|
||||
const link = templateContent.getElementById('advanced-protection-program-link')
|
||||
if (!link) {
|
||||
console.error('[Brave Settings Overrides] Could not find advanced-protection-program-link id on security page.')
|
||||
} else {
|
||||
link.setAttribute('hidden', 'true')
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -89,6 +89,11 @@
|
||||
compress="false"
|
||||
preprocess="true"
|
||||
type="BINDATA" />
|
||||
<include name="IDR_SETTINGS_BRAVE_OVERRIDES_SECURITY_PAGE_JS"
|
||||
file="brave_overrides/security_page.js"
|
||||
compress="false"
|
||||
preprocess="true"
|
||||
type="BINDATA" />
|
||||
<include name="IDR_SETTINGS_BRAVE_OVERRIDES_SETTINGS_MENU_JS"
|
||||
file="brave_overrides/settings_menu.js"
|
||||
compress="false"
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
diff --git a/chrome/browser/resources/settings/privacy_page/security_page.html b/chrome/browser/resources/settings/privacy_page/security_page.html
|
||||
index b228c2eaf46714cc9165bf84bddf7612f0d8ea38..2e0c499653d7ffb52b00d69e277999fd114de331 100644
|
||||
--- a/chrome/browser/resources/settings/privacy_page/security_page.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/security_page.html
|
||||
@@ -124,6 +124,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+<if expr="_google_chrome">
|
||||
<div slot="noSelectionCollapse">
|
||||
<settings-toggle-button id="safeBrowsingReportingToggle"
|
||||
pref="{{prefs.safebrowsing.scout_reporting_enabled}}"
|
||||
@@ -139,6 +140,7 @@
|
||||
sync-status="[[syncStatus]]">
|
||||
</settings-passwords-leak-detection-toggle>
|
||||
</div>
|
||||
+</if>
|
||||
</settings-collapse-radio-button>
|
||||
<settings-collapse-radio-button id="safeBrowsingDisabled" no-collapse
|
||||
name="[[safeBrowsingSettingEnum_.DISABLED]]"
|
||||
Reference in New Issue
Block a user