diff --git a/browser/resources/settings/brave_appearance_page/tabs.html b/browser/resources/settings/brave_appearance_page/tabs.html index 4fb12996350b..65158099356b 100644 --- a/browser/resources/settings/brave_appearance_page/tabs.html +++ b/browser/resources/settings/brave_appearance_page/tabs.html @@ -49,9 +49,7 @@ name="true" no-extension-indicator> - - - + @@ -95,3 +93,12 @@ class="cr-row" label="$i18n{showHoverCardMemoryUsageStandalone}"> + + + + diff --git a/browser/resources/settings/brave_appearance_page/tabs.ts b/browser/resources/settings/brave_appearance_page/tabs.ts index b56229cd0f31..49acd3e746b5 100644 --- a/browser/resources/settings/brave_appearance_page/tabs.ts +++ b/browser/resources/settings/brave_appearance_page/tabs.ts @@ -9,6 +9,7 @@ import '../settings_vars.css.js' import {PrefsMixin, PrefsMixinInterface} from '/shared/settings/prefs/prefs_mixin.js'; import {I18nMixin, I18nMixinInterface} from 'chrome://resources/cr_elements/i18n_mixin.js' import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js' +import {OpenWindowProxyImpl} from 'chrome://resources/js/open_window_proxy.js'; import {loadTimeData} from '../i18n_setup.js' @@ -39,6 +40,11 @@ export class SettingsBraveAppearanceTabsElement extends SettingsBraveAppearanceT private isSharedPinnedTabsEnabled_() { return loadTimeData.getBoolean('isSharedPinnedTabsEnabled') } + + private onDiscardRingTreatmentLearnMoreLinkClick_() { + OpenWindowProxyImpl.getInstance().openUrl( + loadTimeData.getString('discardRingTreatmentLearnMoreUrl')); + } } customElements.define(SettingsBraveAppearanceTabsElement.is, SettingsBraveAppearanceTabsElement) diff --git a/browser/resources/settings/brave_overrides/index.ts b/browser/resources/settings/brave_overrides/index.ts index 1f5d7854c549..84730e361887 100644 --- a/browser/resources/settings/brave_overrides/index.ts +++ b/browser/resources/settings/brave_overrides/index.ts @@ -26,6 +26,7 @@ import './page_visibility.js' import './passwords_section.js' import './payments_section.js' import './people_page.js' +import './performance_page.js' import './personalization_options.js' import './printing_page.js' import './privacy_page.js' diff --git a/browser/resources/settings/brave_overrides/performance_page.ts b/browser/resources/settings/brave_overrides/performance_page.ts new file mode 100644 index 000000000000..d18c5b132c9c --- /dev/null +++ b/browser/resources/settings/brave_overrides/performance_page.ts @@ -0,0 +1,18 @@ +/* Copyright (c) 2024 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 https://mozilla.org/MPL/2.0/. */ + +import {RegisterPolymerTemplateModifications} from 'chrome://resources/brave/polymer_overriding.js' + +RegisterPolymerTemplateModifications({ + 'settings-performance-page': (templateContent) => { + const discardRingTreatmentToggleButton = + templateContent.querySelector('#discardRingTreatmentToggleButton') + if (discardRingTreatmentToggleButton) { + discardRingTreatmentToggleButton.remove() + } else { + console.error('[Settings] Could not find discardRingTreatmentToggleButton') + } + } +}) diff --git a/browser/resources/settings/sources.gni b/browser/resources/settings/sources.gni index 12280ddde9ce..5d5e65e98fc0 100644 --- a/browser/resources/settings/sources.gni +++ b/browser/resources/settings/sources.gni @@ -84,6 +84,7 @@ brave_settings_non_web_component_files = [ "brave_overrides/passwords_section.ts", "brave_overrides/payments_section.ts", "brave_overrides/people_page.ts", + "brave_overrides/performance_page.ts", "brave_overrides/personalization_options.ts", "brave_overrides/printing_page.ts", "brave_overrides/privacy_page.ts", diff --git a/chromium_src/chrome/common/url_constants.h b/chromium_src/chrome/common/url_constants.h index 1340760c5bdf..1b24faee702c 100644 --- a/chromium_src/chrome/common/url_constants.h +++ b/chromium_src/chrome/common/url_constants.h @@ -168,7 +168,7 @@ inline constexpr char kCrashReasonFeedbackDisplayedURL[] = // "Learn more" URL for the inactive tabs appearance setting. inline constexpr char16_t kDiscardRingTreatmentLearnMoreUrl[] = - u"https://support.brave.com/"; + u"https://support.brave.com/hc/en-us/articles/30938249371277"; // "Learn more" URL for the "Do not track" setting in the privacy section. inline constexpr char16_t kDoNotTrackLearnMoreURL[] =