diff --git a/browser/resources/settings/brave_reset_page/brave_reset_profile_dialog_behavior.html b/browser/resources/settings/brave_reset_page/brave_reset_profile_dialog_behavior.html new file mode 100644 index 000000000000..4903fd6ca95d --- /dev/null +++ b/browser/resources/settings/brave_reset_page/brave_reset_profile_dialog_behavior.html @@ -0,0 +1 @@ + diff --git a/browser/resources/settings/brave_reset_page/brave_reset_profile_dialog_behavior.js b/browser/resources/settings/brave_reset_page/brave_reset_profile_dialog_behavior.js new file mode 100644 index 000000000000..a6f0e3f72ea6 --- /dev/null +++ b/browser/resources/settings/brave_reset_page/brave_reset_profile_dialog_behavior.js @@ -0,0 +1,23 @@ +/* Copyright (c) 2019 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/. */ + +BraveResetProfileDialogBehavior = { + + ready: function() { + this.fixSendSettingsCheckbox(); + }, + + /** + * Unchecks, disables, and hides sendSettings checkbox. + * Also, hide the entire footer. + * @private + */ + fixSendSettingsCheckbox: function() { + this.$.sendSettings.checked = false; + this.$.sendSettings.hidden = true; + this.$.sendSettings.disabled = true; + this.$.sendSettings.parentNode.hidden = true; + }, +}; diff --git a/browser/resources/settings/brave_settings_overrides.html b/browser/resources/settings/brave_settings_overrides.html index f17598031652..419e3b60ff31 100644 --- a/browser/resources/settings/brave_settings_overrides.html +++ b/browser/resources/settings/brave_settings_overrides.html @@ -1,5 +1,6 @@ + diff --git a/browser/resources/settings/brave_settings_overrides.js b/browser/resources/settings/brave_settings_overrides.js index 3027afa3d6de..61a8b2a203fc 100644 --- a/browser/resources/settings/brave_settings_overrides.js +++ b/browser/resources/settings/brave_settings_overrides.js @@ -107,6 +107,9 @@ BravePatching.RegisterPolymerComponentBehaviors({ 'settings-clear-browsing-data-dialog': [ BraveClearBrowsingDataOnExitBehavior ], + 'settings-reset-profile-dialog': [ + BraveResetProfileDialogBehavior + ], 'settings-ui': [ BraveClearSettingsMenuHighlightBehavior ] diff --git a/browser/resources/settings/settings_resources.grd b/browser/resources/settings/settings_resources.grd index be3026ae4ab4..7d59c9d72bca 100644 --- a/browser/resources/settings/settings_resources.grd +++ b/browser/resources/settings/settings_resources.grd @@ -34,6 +34,8 @@ + + diff --git a/patches/chrome-browser-resources-settings-reset_page-reset_profile_dialog.html.patch b/patches/chrome-browser-resources-settings-reset_page-reset_profile_dialog.html.patch deleted file mode 100644 index 9c10c37a9e09..000000000000 --- a/patches/chrome-browser-resources-settings-reset_page-reset_profile_dialog.html.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html -index fc3b7521d2a00a2c2a29e856b418ed7f0a7d3c8a..5ad61ba475b6a08a93754967d2f905471cef1420 100644 ---- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html -+++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html -@@ -51,10 +51,12 @@ - $i18n{resetDialogCommit} - - -+ - - - diff --git a/patches/chrome-browser-resources-settings-reset_page-reset_profile_dialog.js.patch b/patches/chrome-browser-resources-settings-reset_page-reset_profile_dialog.js.patch deleted file mode 100644 index dc475036a5d4..000000000000 --- a/patches/chrome-browser-resources-settings-reset_page-reset_profile_dialog.js.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js -index 73acaf410335c02b47ce0375ef12be92568c2f45..f96cc3d3faa4992d8a6f05471743a6cf58e15a4c 100644 ---- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js -+++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js -@@ -75,9 +75,6 @@ Polymer({ - this.addEventListener('cancel', () => { - this.browserProxy_.onHideResetProfileDialog(); - }); -- -- this.$$('cr-checkbox a') -- .addEventListener('click', this.onShowReportedSettingsTap_.bind(this)); - }, - - /** @private */ -@@ -123,6 +120,7 @@ Polymer({ - /** @private */ - onResetTap_: function() { - this.clearingInProgress_ = true; -+ this.$.sendSettings.checked = { checked: false }; - this.browserProxy_ - .performResetProfileSettings( - this.$.sendSettings.checked, this.resetRequestOrigin_)