Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Settings UI privacy page missing settings. #8800

Merged
merged 1 commit into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions browser/resources/settings/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ preprocess_if_expr("preprocess") {
"brave_overrides/passwords_section.js",
"brave_overrides/payments_section.js",
"brave_overrides/people_page.js",
"brave_overrides/personalization_options.js",
"brave_overrides/printing_page.js",
"brave_overrides/reset_profile_dialog.js",
"brave_overrides/safety_check_passwords_child.js",
Expand Down
1 change: 1 addition & 0 deletions browser/resources/settings/brave_overrides/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import './page_visibility.js'
import './passwords_section.js'
import './payments_section.js'
import './people_page.js'
import './personalization_options.js'
import './printing_page.js'
import './safety_check_passwords_child.js'
import './security_page.js'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2021 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'

import '../brave_privacy_page/brave_personalization_options.m.js'
bsclifton marked this conversation as resolved.
Show resolved Hide resolved

RegisterPolymerTemplateModifications({
'settings-personalization-options': (templateContent) => {
const searchSuggestToggle = templateContent.getElementById('searchSuggestToggle')
if (!searchSuggestToggle) {
console.error(`[Brave Settings Overrides] Couldn't find search suggest toggle`)
} else {
searchSuggestToggle.insertAdjacentHTML('afterend', `
<settings-brave-personalization-options prefs="{{prefs}}"></settings-brave-personalization-options>
`)
}
},
})
Original file line number Diff line number Diff line change
@@ -1,37 +1,24 @@
diff --git a/chrome/browser/resources/settings/privacy_page/personalization_options.html b/chrome/browser/resources/settings/privacy_page/personalization_options.html
index 70eeec029bfbf19f8419aa5176acfc7dd8f13732..51308b5bf609288edb885cc6ad82f7ba76c654ab 100644
index 70eeec029bfbf19f8419aa5176acfc7dd8f13732..1be168dddf273d27d28935d2d4d2e64a57796779 100644
--- a/chrome/browser/resources/settings/privacy_page/personalization_options.html
+++ b/chrome/browser/resources/settings/privacy_page/personalization_options.html
@@ -1,3 +1,4 @@
+<link rel="import" href="../brave_privacy_page/brave_personalization_options.html">
<style include="settings-shared">
:host(.list-frame) settings-toggle-button {
padding-inline-end: 0;
@@ -8,6 +9,7 @@
@@ -8,6 +8,7 @@
border-top: none;
}
</style>
+<if expr="_google_chrome">
<if expr="not chromeos">
<settings-toggle-button id="signinAllowedToggle"
class="hr"
@@ -20,6 +22,7 @@
@@ -20,6 +21,7 @@
no-set-pref>
</settings-toggle-button>
</if><!-- not chromeos -->
+</if>
<settings-toggle-button id="searchSuggestToggle"
class="hr"
hidden="[[!pageVisibility.searchPrediction]]"
@@ -27,6 +30,7 @@
label="$i18n{searchSuggestPref}"
sub-label="$i18n{searchSuggestPrefDesc}">
</settings-toggle-button>
+ <settings-brave-personalization-options prefs="{{prefs}}"></settings-brave-personalization-options>
<if expr="_google_chrome">
<if expr="chromeos">
<settings-toggle-button class="hr"
@@ -35,6 +39,8 @@
@@ -35,6 +37,8 @@
sub-label="$i18n{enablePersonalizationLoggingDesc}">
</settings-toggle-button>
</if><!-- chromeos -->
Expand All @@ -40,7 +27,7 @@ index 70eeec029bfbf19f8419aa5176acfc7dd8f13732..51308b5bf609288edb885cc6ad82f7ba
<if expr="not chromeos">
<settings-toggle-button id="metricsReportingControl"
class="hr"
@@ -50,13 +56,15 @@
@@ -50,13 +54,15 @@
</template>
</settings-toggle-button>
</if><!-- not chromeos -->
Expand All @@ -57,15 +44,15 @@ index 70eeec029bfbf19f8419aa5176acfc7dd8f13732..51308b5bf609288edb885cc6ad82f7ba
<if expr="_google_chrome">
<settings-toggle-button id="spellCheckControl"
class="hr"
@@ -76,6 +84,7 @@
@@ -76,6 +82,7 @@
</settings-toggle-button>
</template>

+<if expr="_google_chrome">
<template is="dom-if" if="[[showSignoutDialog_]]" restamp>
<settings-signout-dialog sync-status="[[syncStatus]]"
on-close="onSignoutDialogClosed_">
@@ -88,3 +97,4 @@
@@ -88,3 +95,4 @@
<cr-button on-click="onRestartTap_">$i18n{restart}</cr-button>
</cr-toast>
</if>
Expand Down