mirror of
https://github.com/morgan9e/helium
synced 2026-04-15 00:44:06 +09:00
helium/core: add helium services versioning/changelog
also move stringprintf import in helpers to correct patch
This commit is contained in:
@@ -267,14 +267,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// Supervised Users. This setting is queried in our Tast tests (b/241943380).
|
// Supervised Users. This setting is queried in our Tast tests (b/241943380).
|
||||||
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
|
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||||
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
|
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||||
@@ -63,6 +63,7 @@
|
@@ -58,6 +58,7 @@
|
||||||
#include "chrome/browser/ui/webui/settings/font_handler.h"
|
#include "chrome/browser/ui/webui/settings/about_handler.h"
|
||||||
#include "chrome/browser/ui/webui/settings/hats_handler.h"
|
#include "chrome/browser/ui/webui/settings/accessibility_main_handler.h"
|
||||||
#include "chrome/browser/ui/webui/settings/import_data_handler.h"
|
#include "chrome/browser/ui/webui/settings/appearance_handler.h"
|
||||||
+#include "chrome/browser/ui/webui/settings/brave_import_data_handler.h"
|
+#include "chrome/browser/ui/webui/settings/brave_import_data_handler.h"
|
||||||
#include "chrome/browser/ui/webui/settings/metrics_reporting_handler.h"
|
#include "chrome/browser/ui/webui/settings/browser_lifetime_handler.h"
|
||||||
#include "chrome/browser/ui/webui/settings/on_startup_handler.h"
|
#include "chrome/browser/ui/webui/settings/downloads_handler.h"
|
||||||
#include "chrome/browser/ui/webui/settings/password_manager_handler.h"
|
#include "chrome/browser/ui/webui/settings/font_handler.h"
|
||||||
@@ -203,6 +204,7 @@ void SettingsUI::RegisterProfilePrefs(
|
@@ -203,6 +204,7 @@ void SettingsUI::RegisterProfilePrefs(
|
||||||
registry->RegisterBooleanPref(prefs::kImportDialogHistory, true);
|
registry->RegisterBooleanPref(prefs::kImportDialogHistory, true);
|
||||||
registry->RegisterBooleanPref(prefs::kImportDialogSavedPasswords, true);
|
registry->RegisterBooleanPref(prefs::kImportDialogSavedPasswords, true);
|
||||||
|
|||||||
@@ -700,7 +700,7 @@
|
|||||||
// Sanity check for https://crbug.com/781703.
|
// Sanity check for https://crbug.com/781703.
|
||||||
--- a/components/helium_services/helium_services_helpers.cc
|
--- a/components/helium_services/helium_services_helpers.cc
|
||||||
+++ b/components/helium_services/helium_services_helpers.cc
|
+++ b/components/helium_services/helium_services_helpers.cc
|
||||||
@@ -66,6 +66,11 @@ bool ShouldAccessExtensionService(const
|
@@ -67,6 +67,11 @@ bool ShouldAccessExtensionService(const
|
||||||
prefs.GetBoolean(prefs::kHeliumExtProxyEnabled);
|
prefs.GetBoolean(prefs::kHeliumExtProxyEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -714,9 +714,9 @@
|
|||||||
return GetDummyURL();
|
return GetDummyURL();
|
||||||
--- a/components/helium_services/helium_services_helpers.h
|
--- a/components/helium_services/helium_services_helpers.h
|
||||||
+++ b/components/helium_services/helium_services_helpers.h
|
+++ b/components/helium_services/helium_services_helpers.h
|
||||||
@@ -18,6 +18,7 @@ const char kHeliumDefaultOrigin[] =
|
@@ -20,6 +20,7 @@ const char kHeliumDummyOrigin[] =
|
||||||
const char kHeliumDummyOrigin[] =
|
|
||||||
"https://helium-services-are-disabled.qjz9zk";
|
bool ShouldAccessServices(const PrefService& prefs);
|
||||||
|
|
||||||
+COMPONENT_EXPORT(HELIUM) bool ShouldFetchBangs(const PrefService& prefs);
|
+COMPONENT_EXPORT(HELIUM) bool ShouldFetchBangs(const PrefService& prefs);
|
||||||
COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
|
COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
|
||||||
@@ -724,19 +724,19 @@
|
|||||||
COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
|
COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
|
||||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||||
@@ -2125,6 +2125,9 @@ void AddPrivacyStrings(content::WebUIDat
|
@@ -2133,6 +2133,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||||
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
|
||||||
{"heliumServicesToggleDescription",
|
{"heliumExtProxyToggleDescription",
|
||||||
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION},
|
||||||
+ {"heliumBangsToggle", IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE},
|
+ {"heliumBangsToggle", IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE},
|
||||||
+ {"heliumBangsToggleDescription",
|
+ {"heliumBangsToggleDescription",
|
||||||
+ IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION},
|
+ IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION},
|
||||||
{"heliumExtProxyToggle",
|
{"heliumOriginOverride", IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE},
|
||||||
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
|
{"heliumOriginOverrideDescription",
|
||||||
{"heliumExtProxyToggleDescription",
|
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
|
||||||
--- a/chrome/app/settings_strings.grdp
|
--- a/chrome/app/settings_strings.grdp
|
||||||
+++ b/chrome/app/settings_strings.grdp
|
+++ b/chrome/app/settings_strings.grdp
|
||||||
@@ -1981,6 +1981,12 @@
|
@@ -1990,6 +1990,12 @@
|
||||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of downloading and proxying extensions">
|
<message name="IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of downloading and proxying extensions">
|
||||||
When enabled, Helium will proxy extension downloads and updates to protect your privacy. When disabled, downloading and updating extensions will not work.
|
When enabled, Helium will proxy extension downloads and updates to protect your privacy. When disabled, downloading and updating extensions will not work.
|
||||||
</message>
|
</message>
|
||||||
@@ -751,7 +751,7 @@
|
|||||||
</message>
|
</message>
|
||||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
@@ -50,6 +50,11 @@
|
@@ -84,6 +84,11 @@
|
||||||
label="$i18n{heliumExtProxyToggle}"
|
label="$i18n{heliumExtProxyToggle}"
|
||||||
sub-label="$i18n{heliumExtProxyToggleDescription}">
|
sub-label="$i18n{heliumExtProxyToggleDescription}">
|
||||||
</settings-toggle-button>
|
</settings-toggle-button>
|
||||||
@@ -765,9 +765,9 @@
|
|||||||
</template>
|
</template>
|
||||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
@@ -211,6 +211,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
@@ -213,6 +213,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||||
|
registry->RegisterIntegerPref(prefs::kHeliumSchemaVersion, 0);
|
||||||
{
|
registry->RegisterBooleanPref(prefs::kHeliumDisableSchemaAlerts, false);
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
||||||
+ registry->RegisterBooleanPref(prefs::kHeliumBangsEnabled, true);
|
+ registry->RegisterBooleanPref(prefs::kHeliumBangsEnabled, true);
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumExtProxyEnabled, true);
|
registry->RegisterBooleanPref(prefs::kHeliumExtProxyEnabled, true);
|
||||||
@@ -786,7 +786,7 @@
|
|||||||
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
||||||
--- a/components/helium_services/pref_names.h
|
--- a/components/helium_services/pref_names.h
|
||||||
+++ b/components/helium_services/pref_names.h
|
+++ b/components/helium_services/pref_names.h
|
||||||
@@ -24,6 +24,9 @@ inline constexpr char kHeliumDidOnboardi
|
@@ -30,6 +30,9 @@ inline constexpr char kHeliumDidOnboardi
|
||||||
inline constexpr char kHeliumExtProxyEnabled[] =
|
inline constexpr char kHeliumExtProxyEnabled[] =
|
||||||
"helium.services.ext_proxy";
|
"helium.services.ext_proxy";
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ TODO: guard services_page.html with is_mac
|
|||||||
|
|
||||||
--- a/components/helium_services/pref_names.h
|
--- a/components/helium_services/pref_names.h
|
||||||
+++ b/components/helium_services/pref_names.h
|
+++ b/components/helium_services/pref_names.h
|
||||||
@@ -27,6 +27,9 @@ inline constexpr char kHeliumExtProxyEna
|
@@ -33,6 +33,9 @@ inline constexpr char kHeliumExtProxyEna
|
||||||
inline constexpr char kHeliumBangsEnabled[] =
|
inline constexpr char kHeliumBangsEnabled[] =
|
||||||
"helium.services.bangs";
|
"helium.services.bangs";
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ TODO: guard services_page.html with is_mac
|
|||||||
|
|
||||||
--- a/components/helium_services/helium_services_helpers.h
|
--- a/components/helium_services/helium_services_helpers.h
|
||||||
+++ b/components/helium_services/helium_services_helpers.h
|
+++ b/components/helium_services/helium_services_helpers.h
|
||||||
@@ -20,11 +20,13 @@ const char kHeliumDummyOrigin[] =
|
@@ -22,11 +22,13 @@ bool ShouldAccessServices(const PrefServ
|
||||||
|
|
||||||
COMPONENT_EXPORT(HELIUM) bool ShouldFetchBangs(const PrefService& prefs);
|
COMPONENT_EXPORT(HELIUM) bool ShouldFetchBangs(const PrefService& prefs);
|
||||||
COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
|
COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
|
||||||
@@ -30,15 +30,7 @@ TODO: guard services_page.html with is_mac
|
|||||||
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
|
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
|
||||||
--- a/components/helium_services/helium_services_helpers.cc
|
--- a/components/helium_services/helium_services_helpers.cc
|
||||||
+++ b/components/helium_services/helium_services_helpers.cc
|
+++ b/components/helium_services/helium_services_helpers.cc
|
||||||
@@ -7,6 +7,7 @@
|
@@ -16,6 +16,12 @@
|
||||||
#include <optional>
|
|
||||||
|
|
||||||
#include "base/functional/bind.h"
|
|
||||||
+#include "base/strings/stringprintf.h"
|
|
||||||
#include "components/helium_services/pref_names.h"
|
|
||||||
#include "components/prefs/pref_service.h"
|
|
||||||
#include "net/base/url_util.h"
|
|
||||||
@@ -15,6 +16,12 @@
|
|
||||||
|
|
||||||
namespace helium {
|
namespace helium {
|
||||||
|
|
||||||
@@ -51,7 +43,7 @@ TODO: guard services_page.html with is_mac
|
|||||||
std::optional<GURL> GetValidUserOverridenURL(std::string_view user_url_) {
|
std::optional<GURL> GetValidUserOverridenURL(std::string_view user_url_) {
|
||||||
if (user_url_.empty()) {
|
if (user_url_.empty()) {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
@@ -76,6 +83,11 @@ bool ShouldFetchBangs(const PrefService&
|
@@ -77,6 +83,11 @@ bool ShouldFetchBangs(const PrefService&
|
||||||
prefs.GetBoolean(prefs::kHeliumBangsEnabled);
|
prefs.GetBoolean(prefs::kHeliumBangsEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +55,7 @@ TODO: guard services_page.html with is_mac
|
|||||||
GURL GetExtensionUpdateURL(const PrefService& prefs) {
|
GURL GetExtensionUpdateURL(const PrefService& prefs) {
|
||||||
if (!ShouldAccessExtensionService(prefs)) {
|
if (!ShouldAccessExtensionService(prefs)) {
|
||||||
return GetDummyURL();
|
return GetDummyURL();
|
||||||
@@ -101,6 +113,20 @@ GURL GetSpellcheckURL(const PrefService&
|
@@ -102,6 +113,20 @@ GURL GetSpellcheckURL(const PrefService&
|
||||||
return GetServicesBaseURL(prefs).Resolve("/dict/");
|
return GetServicesBaseURL(prefs).Resolve("/dict/");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +78,7 @@ TODO: guard services_page.html with is_mac
|
|||||||
registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
||||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
@@ -62,6 +62,13 @@
|
@@ -96,6 +96,13 @@
|
||||||
sub-label="$i18n{heliumSpellcheckToggleDescription}">
|
sub-label="$i18n{heliumSpellcheckToggleDescription}">
|
||||||
</settings-toggle-button>
|
</settings-toggle-button>
|
||||||
</if>
|
</if>
|
||||||
@@ -102,10 +94,10 @@ TODO: guard services_page.html with is_mac
|
|||||||
</template>
|
</template>
|
||||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||||
@@ -2135,6 +2135,10 @@ void AddPrivacyStrings(content::WebUIDat
|
@@ -2139,6 +2139,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||||
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
|
{"heliumSpellcheckToggle", IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE},
|
||||||
{"heliumExtProxyToggleDescription",
|
{"heliumSpellcheckToggleDescription",
|
||||||
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION},
|
IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE_DESCRIPTION},
|
||||||
+ {"heliumUpdatesToggle",
|
+ {"heliumUpdatesToggle",
|
||||||
+ IDS_SETTINGS_HELIUM_SERVICES_UPDATE},
|
+ IDS_SETTINGS_HELIUM_SERVICES_UPDATE},
|
||||||
+ {"heliumUpdatesToggleDescription",
|
+ {"heliumUpdatesToggleDescription",
|
||||||
@@ -126,7 +118,7 @@ TODO: guard services_page.html with is_mac
|
|||||||
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
||||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
@@ -217,6 +217,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
@@ -219,6 +219,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||||
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
|
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
|
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
||||||
@@ -136,7 +128,7 @@ TODO: guard services_page.html with is_mac
|
|||||||
registry->RegisterBooleanPref(
|
registry->RegisterBooleanPref(
|
||||||
--- a/chrome/app/settings_strings.grdp
|
--- a/chrome/app/settings_strings.grdp
|
||||||
+++ b/chrome/app/settings_strings.grdp
|
+++ b/chrome/app/settings_strings.grdp
|
||||||
@@ -1996,6 +1996,12 @@
|
@@ -2005,6 +2005,12 @@
|
||||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE_DESCRIPTION" desc="Description of the for enabling/disabling of downloading spellcheck files">
|
<message name="IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE_DESCRIPTION" desc="Description of the for enabling/disabling of downloading spellcheck files">
|
||||||
Helium will fetch dictionary files used for spell checking when requested. When disabled, spell checking will not work.
|
Helium will fetch dictionary files used for spell checking when requested. When disabled, spell checking will not work.
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BrowserCommandController::TabStateChanged() {
|
void BrowserCommandController::TabStateChanged() {
|
||||||
@@ -1176,6 +1178,14 @@ bool BrowserCommandController::ExecuteCo
|
@@ -1179,6 +1181,14 @@ bool BrowserCommandController::ExecuteCo
|
||||||
case IDC_DUPLICATE_TARGET_TAB:
|
case IDC_DUPLICATE_TARGET_TAB:
|
||||||
DuplicateKeyboardFocusedTab(browser_);
|
DuplicateKeyboardFocusedTab(browser_);
|
||||||
break;
|
break;
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
// Hosted App commands
|
// Hosted App commands
|
||||||
case IDC_COPY_URL:
|
case IDC_COPY_URL:
|
||||||
CopyURL(browser_, browser_->tab_strip_model()->GetActiveWebContents());
|
CopyURL(browser_, browser_->tab_strip_model()->GetActiveWebContents());
|
||||||
@@ -1926,6 +1936,12 @@ void BrowserCommandController::UpdateCom
|
@@ -1930,6 +1940,12 @@ void BrowserCommandController::UpdateCom
|
||||||
|
|
||||||
bool dev_tools_enabled = DevToolsWindow::AllowDevToolsFor(
|
bool dev_tools_enabled = DevToolsWindow::AllowDevToolsFor(
|
||||||
profile(), browser_->tab_strip_model()->GetActiveWebContents());
|
profile(), browser_->tab_strip_model()->GetActiveWebContents());
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
--- a/components/helium_services/pref_names.h
|
--- a/components/helium_services/pref_names.h
|
||||||
+++ b/components/helium_services/pref_names.h
|
+++ b/components/helium_services/pref_names.h
|
||||||
@@ -7,12 +7,20 @@
|
@@ -13,12 +13,20 @@ inline constexpr char kHeliumSchemaVersi
|
||||||
|
inline constexpr char kHeliumDisableSchemaAlerts[] =
|
||||||
namespace prefs {
|
"helium.services.disable_schema_alerts";
|
||||||
|
|
||||||
+inline constexpr char kHeliumPrefPrefix[] = "helium.";
|
+inline constexpr char kHeliumPrefPrefix[] = "helium.";
|
||||||
+
|
+
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
|
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
|
||||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
@@ -208,6 +208,8 @@ void RegisterBrowserUserPrefs(user_prefs
|
@@ -210,6 +210,8 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||||
{
|
registry->RegisterBooleanPref(prefs::kHeliumDisableSchemaAlerts, false);
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
||||||
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
|
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
|
||||||
+ registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
|
+ registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
|
||||||
@@ -494,8 +494,8 @@
|
|||||||
registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
||||||
+ registrar.Add(prefs::kHeliumServicesConsented, observer);
|
+ registrar.Add(prefs::kHeliumServicesConsented, observer);
|
||||||
registrar.Add(prefs::kHeliumServicesOrigin, observer);
|
registrar.Add(prefs::kHeliumServicesOrigin, observer);
|
||||||
|
registrar.Add(prefs::kHeliumSchemaVersion, observer);
|
||||||
registrar.Add(pref_name, observer);
|
registrar.Add(pref_name, observer);
|
||||||
}
|
|
||||||
--- a/chrome/browser/ui/incognito_allowed_url.cc
|
--- a/chrome/browser/ui/incognito_allowed_url.cc
|
||||||
+++ b/chrome/browser/ui/incognito_allowed_url.cc
|
+++ b/chrome/browser/ui/incognito_allowed_url.cc
|
||||||
@@ -48,7 +48,8 @@ bool IsHostAllowedInIncognito(const GURL
|
@@ -48,7 +48,8 @@ bool IsHostAllowedInIncognito(const GURL
|
||||||
@@ -533,9 +533,9 @@
|
|||||||
|
|
||||||
--- a/chrome/app/settings_strings.grdp
|
--- a/chrome/app/settings_strings.grdp
|
||||||
+++ b/chrome/app/settings_strings.grdp
|
+++ b/chrome/app/settings_strings.grdp
|
||||||
@@ -1947,6 +1947,12 @@
|
@@ -1956,6 +1956,12 @@
|
||||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_DESCRIPTION" desc="Description of the controls available on the Helium services settings page">
|
<message name="IDS_SETTINGS_HELIUM_SCHEMA_IGNORE" desc="Checkbox label to ignore any future services change alerts">
|
||||||
Manage what Helium services are allowed in your browser
|
Don't show sensitive update notifications
|
||||||
</message>
|
</message>
|
||||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_SETUP_PENDING_TEXT" desc="Description shown in services settings when user has not completed onboarding">
|
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_SETUP_PENDING_TEXT" desc="Description shown in services settings when user has not completed onboarding">
|
||||||
+ Helium services are not available until setup is complete to ensure your privacy and consent.
|
+ Helium services are not available until setup is complete to ensure your privacy and consent.
|
||||||
@@ -559,9 +559,9 @@
|
|||||||
(*s_allowlist)[::prefs::kPrivacyGuideViewed] =
|
(*s_allowlist)[::prefs::kPrivacyGuideViewed] =
|
||||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
@@ -2,10 +2,42 @@
|
@@ -19,10 +19,42 @@
|
||||||
.label-wrapper {
|
margin-top: calc(var(--cr-changelog-padding) / 2);
|
||||||
padding: var(--cr-section-vertical-padding) 0;
|
padding-top: calc(var(--cr-changelog-padding) / 2);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ #onboarding-link {
|
+ #onboarding-link {
|
||||||
@@ -599,10 +599,10 @@
|
|||||||
+ </template>
|
+ </template>
|
||||||
+
|
+
|
||||||
+ <template is="dom-if" if="[[prefs.helium.services.user_consented.value]]">
|
+ <template is="dom-if" if="[[prefs.helium.services.user_consented.value]]">
|
||||||
<settings-toggle-button id="servicesToggleButton"
|
<template is="dom-if" if="[[changes_.length]]">
|
||||||
pref="{{prefs.helium.services.enabled}}"
|
<div id="changelog-notice">
|
||||||
label="$i18n{heliumServicesToggle}"
|
<div>$i18n{heliumSchemaUpdatedTitle}</div>
|
||||||
@@ -15,6 +47,7 @@
|
@@ -49,6 +81,7 @@
|
||||||
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
|
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
|
||||||
</cr-collapse>
|
</cr-collapse>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -177,9 +177,9 @@
|
|||||||
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
||||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
@@ -211,6 +211,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
@@ -213,6 +213,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||||
|
registry->RegisterIntegerPref(prefs::kHeliumSchemaVersion, 0);
|
||||||
{
|
registry->RegisterBooleanPref(prefs::kHeliumDisableSchemaAlerts, false);
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
||||||
+ registry->RegisterBooleanPref(prefs::kHeliumExtProxyEnabled, true);
|
+ registry->RegisterBooleanPref(prefs::kHeliumExtProxyEnabled, true);
|
||||||
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
|
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
||||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
@@ -45,6 +45,11 @@
|
@@ -79,6 +79,11 @@
|
||||||
</settings-toggle-button>
|
</settings-toggle-button>
|
||||||
<div class="cr-col">
|
<div class="cr-col">
|
||||||
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
|
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
|
||||||
@@ -201,10 +201,10 @@
|
|||||||
</template>
|
</template>
|
||||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||||
@@ -2125,6 +2125,10 @@ void AddPrivacyStrings(content::WebUIDat
|
@@ -2129,6 +2129,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||||
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
{"heliumSchemaUpdatedDescription", IDS_SETTINGS_HELIUM_SCHEMA_NOTICE_DESC},
|
||||||
{"heliumServicesToggleDescription",
|
{"heliumGotIt", IDS_SETTINGS_GOT_IT},
|
||||||
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
{"heliumSchemaIgnore", IDS_SETTINGS_HELIUM_SCHEMA_IGNORE},
|
||||||
+ {"heliumExtProxyToggle",
|
+ {"heliumExtProxyToggle",
|
||||||
+ IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
|
+ IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
|
||||||
+ {"heliumExtProxyToggleDescription",
|
+ {"heliumExtProxyToggleDescription",
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
|
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
|
||||||
--- a/chrome/app/settings_strings.grdp
|
--- a/chrome/app/settings_strings.grdp
|
||||||
+++ b/chrome/app/settings_strings.grdp
|
+++ b/chrome/app/settings_strings.grdp
|
||||||
@@ -1975,6 +1975,12 @@
|
@@ -1984,6 +1984,12 @@
|
||||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of all Helium services">
|
<message name="IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of all Helium services">
|
||||||
When enabled, Helium will be able to connect to anonymous web services to provide additional functionality. When disabled, additional features will not work.
|
When enabled, Helium will be able to connect to anonymous web services to provide additional functionality. When disabled, additional features will not work.
|
||||||
</message>
|
</message>
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
</message>
|
</message>
|
||||||
--- a/components/helium_services/pref_names.h
|
--- a/components/helium_services/pref_names.h
|
||||||
+++ b/components/helium_services/pref_names.h
|
+++ b/components/helium_services/pref_names.h
|
||||||
@@ -21,6 +21,9 @@ inline constexpr char kHeliumServicesCon
|
@@ -27,6 +27,9 @@ inline constexpr char kHeliumServicesCon
|
||||||
inline constexpr char kHeliumDidOnboarding[] =
|
inline constexpr char kHeliumDidOnboarding[] =
|
||||||
"helium.completed_onboarding";
|
"helium.completed_onboarding";
|
||||||
|
|
||||||
@@ -241,7 +241,15 @@
|
|||||||
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
|
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
|
||||||
--- a/components/helium_services/helium_services_helpers.cc
|
--- a/components/helium_services/helium_services_helpers.cc
|
||||||
+++ b/components/helium_services/helium_services_helpers.cc
|
+++ b/components/helium_services/helium_services_helpers.cc
|
||||||
@@ -61,6 +61,28 @@ bool ShouldAccessServices(const PrefServ
|
@@ -7,6 +7,7 @@
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
|
#include "base/functional/bind.h"
|
||||||
|
+#include "base/strings/stringprintf.h"
|
||||||
|
#include "components/helium_services/pref_names.h"
|
||||||
|
#include "components/prefs/pref_service.h"
|
||||||
|
#include "net/base/url_util.h"
|
||||||
|
@@ -61,6 +62,28 @@ bool ShouldAccessServices(const PrefServ
|
||||||
|| prefs.HasPrefPath(prefs::kHeliumServicesEnabled));
|
|| prefs.HasPrefPath(prefs::kHeliumServicesEnabled));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,9 +280,9 @@
|
|||||||
registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
||||||
--- a/components/helium_services/helium_services_helpers.h
|
--- a/components/helium_services/helium_services_helpers.h
|
||||||
+++ b/components/helium_services/helium_services_helpers.h
|
+++ b/components/helium_services/helium_services_helpers.h
|
||||||
@@ -18,8 +18,11 @@ const char kHeliumDefaultOrigin[] =
|
@@ -20,8 +20,11 @@ const char kHeliumDummyOrigin[] =
|
||||||
const char kHeliumDummyOrigin[] =
|
|
||||||
"https://helium-services-are-disabled.qjz9zk";
|
bool ShouldAccessServices(const PrefService& prefs);
|
||||||
|
|
||||||
+COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
|
+COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
|
||||||
COMPONENT_EXPORT(HELIUM) GURL GetServicesBaseURL(const PrefService& prefs);
|
COMPONENT_EXPORT(HELIUM) GURL GetServicesBaseURL(const PrefService& prefs);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
--- a/components/helium_services/helium_services_helpers.cc
|
--- a/components/helium_services/helium_services_helpers.cc
|
||||||
+++ b/components/helium_services/helium_services_helpers.cc
|
+++ b/components/helium_services/helium_services_helpers.cc
|
||||||
@@ -66,6 +66,11 @@ bool ShouldAccessExtensionService(const
|
@@ -67,6 +67,11 @@ bool ShouldAccessExtensionService(const
|
||||||
prefs.GetBoolean(prefs::kHeliumExtProxyEnabled);
|
prefs.GetBoolean(prefs::kHeliumExtProxyEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
bool ShouldFetchBangs(const PrefService& prefs) {
|
bool ShouldFetchBangs(const PrefService& prefs) {
|
||||||
return ShouldAccessServices(prefs) &&
|
return ShouldAccessServices(prefs) &&
|
||||||
prefs.GetBoolean(prefs::kHeliumBangsEnabled);
|
prefs.GetBoolean(prefs::kHeliumBangsEnabled);
|
||||||
@@ -88,6 +93,14 @@ GURL GetWebstoreSnippetURL(const PrefSer
|
@@ -89,6 +94,14 @@ GURL GetWebstoreSnippetURL(const PrefSer
|
||||||
base::StringPrintf("/ext/cws_snippet?id=%s", id));
|
base::StringPrintf("/ext/cws_snippet?id=%s", id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
||||||
--- a/components/helium_services/helium_services_helpers.h
|
--- a/components/helium_services/helium_services_helpers.h
|
||||||
+++ b/components/helium_services/helium_services_helpers.h
|
+++ b/components/helium_services/helium_services_helpers.h
|
||||||
@@ -24,6 +24,7 @@ COMPONENT_EXPORT(HELIUM) GURL GetService
|
@@ -26,6 +26,7 @@ COMPONENT_EXPORT(HELIUM) GURL GetService
|
||||||
COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
|
COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
|
||||||
COMPONENT_EXPORT(HELIUM) GURL GetExtensionUpdateURL(const PrefService& prefs);
|
COMPONENT_EXPORT(HELIUM) GURL GetExtensionUpdateURL(const PrefService& prefs);
|
||||||
COMPONENT_EXPORT(HELIUM) GURL GetWebstoreSnippetURL(const PrefService& prefs, std::string_view id);
|
COMPONENT_EXPORT(HELIUM) GURL GetWebstoreSnippetURL(const PrefService& prefs, std::string_view id);
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
|
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
|
||||||
--- a/components/helium_services/pref_names.h
|
--- a/components/helium_services/pref_names.h
|
||||||
+++ b/components/helium_services/pref_names.h
|
+++ b/components/helium_services/pref_names.h
|
||||||
@@ -27,6 +27,9 @@ inline constexpr char kHeliumExtProxyEna
|
@@ -33,6 +33,9 @@ inline constexpr char kHeliumExtProxyEna
|
||||||
inline constexpr char kHeliumBangsEnabled[] =
|
inline constexpr char kHeliumBangsEnabled[] =
|
||||||
"helium.services.bangs";
|
"helium.services.bangs";
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
||||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
@@ -213,6 +213,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
@@ -215,6 +215,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumBangsEnabled, true);
|
registry->RegisterBooleanPref(prefs::kHeliumBangsEnabled, true);
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumExtProxyEnabled, true);
|
registry->RegisterBooleanPref(prefs::kHeliumExtProxyEnabled, true);
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
||||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
@@ -55,6 +55,13 @@
|
@@ -89,6 +89,13 @@
|
||||||
label="$i18n{heliumBangsToggle}"
|
label="$i18n{heliumBangsToggle}"
|
||||||
sub-label="$i18n{heliumBangsToggleDescription}">
|
sub-label="$i18n{heliumBangsToggleDescription}">
|
||||||
</settings-toggle-button>
|
</settings-toggle-button>
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if expr="is_chromeos">
|
<if expr="is_chromeos">
|
||||||
@@ -1987,6 +1990,12 @@
|
@@ -1996,6 +1999,12 @@
|
||||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of downloading bangs">
|
<message name="IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of downloading bangs">
|
||||||
Helium will fetch a list of bangs that help you browse the Internet faster, such as !w or !gh. When disabled, bangs will not work.
|
Helium will fetch a list of bangs that help you browse the Internet faster, such as !w or !gh. When disabled, bangs will not work.
|
||||||
</message>
|
</message>
|
||||||
@@ -178,16 +178,16 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif // !BUILDFLAG(IS_CHROMEOS)
|
#endif // !BUILDFLAG(IS_CHROMEOS)
|
||||||
#if BUILDFLAG(IS_CHROMEOS)
|
#if BUILDFLAG(IS_CHROMEOS)
|
||||||
@@ -2128,6 +2128,9 @@ void AddPrivacyStrings(content::WebUIDat
|
@@ -2136,6 +2136,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||||
{"heliumBangsToggle", IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE},
|
{"heliumBangsToggle", IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE},
|
||||||
{"heliumBangsToggleDescription",
|
{"heliumBangsToggleDescription",
|
||||||
IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION},
|
IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION},
|
||||||
+ {"heliumSpellcheckToggle", IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE},
|
+ {"heliumSpellcheckToggle", IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE},
|
||||||
+ {"heliumSpellcheckToggleDescription",
|
+ {"heliumSpellcheckToggleDescription",
|
||||||
+ IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE_DESCRIPTION},
|
+ IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE_DESCRIPTION},
|
||||||
{"heliumExtProxyToggle",
|
{"heliumOriginOverride", IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE},
|
||||||
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
|
{"heliumOriginOverrideDescription",
|
||||||
{"heliumExtProxyToggleDescription",
|
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
|
||||||
--- a/chrome/common/features.gni
|
--- a/chrome/common/features.gni
|
||||||
+++ b/chrome/common/features.gni
|
+++ b/chrome/common/features.gni
|
||||||
@@ -10,6 +10,7 @@ import("//components/compose/features.gn
|
@@ -10,6 +10,7 @@ import("//components/compose/features.gn
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include "components/safe_browsing/core/common/features.h"
|
#include "components/safe_browsing/core/common/features.h"
|
||||||
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
|
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
|
||||||
#include "components/saved_tab_groups/public/features.h"
|
#include "components/saved_tab_groups/public/features.h"
|
||||||
@@ -2662,14 +2660,9 @@ void AddSearchStrings(content::WebUIData
|
@@ -2666,14 +2664,9 @@ void AddSearchStrings(content::WebUIData
|
||||||
html_source->AddString("searchExplanationLearnMoreURL",
|
html_source->AddString("searchExplanationLearnMoreURL",
|
||||||
chrome::kOmniboxLearnMoreURL);
|
chrome::kOmniboxLearnMoreURL);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--- a/chrome/app/settings_strings.grdp
|
--- a/chrome/app/settings_strings.grdp
|
||||||
+++ b/chrome/app/settings_strings.grdp
|
+++ b/chrome/app/settings_strings.grdp
|
||||||
@@ -1941,6 +1941,31 @@
|
@@ -1941,6 +1941,40 @@
|
||||||
<message name="IDS_SETTINGS_SECURITY_DESCRIPTION" desc="Description of the controls available on the security settings page">
|
<message name="IDS_SETTINGS_SECURITY_DESCRIPTION" desc="Description of the controls available on the security settings page">
|
||||||
Safe Browsing (protection from dangerous sites) and other security settings
|
Safe Browsing (protection from dangerous sites) and other security settings
|
||||||
</message>
|
</message>
|
||||||
@@ -10,6 +10,15 @@
|
|||||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_DESCRIPTION" desc="Description of the controls available on the Helium services settings page">
|
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_DESCRIPTION" desc="Description of the controls available on the Helium services settings page">
|
||||||
+ Manage what Helium services are allowed in your browser
|
+ Manage what Helium services are allowed in your browser
|
||||||
+ </message>
|
+ </message>
|
||||||
|
+ <message name="IDS_SETTINGS_HELIUM_SCHEMA_NOTICE_TITLE" desc="Title of the alert shown when Helium services have a change in behavior">
|
||||||
|
+ Helium services have updated:
|
||||||
|
+ </message>
|
||||||
|
+ <message name="IDS_SETTINGS_HELIUM_SCHEMA_NOTICE_DESC" desc="Description of the alert shown when Helium services have a change in behavior">
|
||||||
|
+ If you wish to change your preferences after this update, feel free to do so below.
|
||||||
|
+ </message>
|
||||||
|
+ <message name="IDS_SETTINGS_HELIUM_SCHEMA_IGNORE" desc="Checkbox label to ignore any future services change alerts">
|
||||||
|
+ Don't show sensitive update notifications
|
||||||
|
+ </message>
|
||||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_TOGGLE" desc="Global toggle for enabling/disabling of all Helium services">
|
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_TOGGLE" desc="Global toggle for enabling/disabling of all Helium services">
|
||||||
+ Allow connecting to Helium services
|
+ Allow connecting to Helium services
|
||||||
+ </message>
|
+ </message>
|
||||||
@@ -34,7 +43,7 @@
|
|||||||
Google Advanced Protection Program
|
Google Advanced Protection Program
|
||||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||||
@@ -2117,6 +2117,18 @@ void AddPrivacyStrings(content::WebUIDat
|
@@ -2117,6 +2117,22 @@ void AddPrivacyStrings(content::WebUIDat
|
||||||
{"siteSettingsSublabel", IDS_SETTINGS_PERMISSIONS_DESCRIPTION},
|
{"siteSettingsSublabel", IDS_SETTINGS_PERMISSIONS_DESCRIPTION},
|
||||||
{"securityPageTitle", IDS_SETTINGS_SECURITY},
|
{"securityPageTitle", IDS_SETTINGS_SECURITY},
|
||||||
{"securityPageDescription", IDS_SETTINGS_SECURITY_DESCRIPTION},
|
{"securityPageDescription", IDS_SETTINGS_SECURITY_DESCRIPTION},
|
||||||
@@ -43,6 +52,10 @@
|
|||||||
+ {"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
+ {"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
||||||
+ {"heliumServicesToggleDescription",
|
+ {"heliumServicesToggleDescription",
|
||||||
+ IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
+ IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
||||||
|
+ {"heliumSchemaUpdatedTitle", IDS_SETTINGS_HELIUM_SCHEMA_NOTICE_TITLE},
|
||||||
|
+ {"heliumSchemaUpdatedDescription", IDS_SETTINGS_HELIUM_SCHEMA_NOTICE_DESC},
|
||||||
|
+ {"heliumGotIt", IDS_SETTINGS_GOT_IT},
|
||||||
|
+ {"heliumSchemaIgnore", IDS_SETTINGS_HELIUM_SCHEMA_IGNORE},
|
||||||
+ {"heliumOriginOverride", IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE},
|
+ {"heliumOriginOverride", IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE},
|
||||||
+ {"heliumOriginOverrideDescription",
|
+ {"heliumOriginOverrideDescription",
|
||||||
+ IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
|
+ IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
|
||||||
@@ -151,17 +164,59 @@
|
|||||||
"privacy_sandbox/privacy_sandbox_ad_measurement_subpage.ts",
|
"privacy_sandbox/privacy_sandbox_ad_measurement_subpage.ts",
|
||||||
"privacy_sandbox/privacy_sandbox_fledge_subpage.ts",
|
"privacy_sandbox/privacy_sandbox_fledge_subpage.ts",
|
||||||
"privacy_sandbox/privacy_sandbox_interest_item.ts",
|
"privacy_sandbox/privacy_sandbox_interest_item.ts",
|
||||||
|
@@ -390,6 +391,7 @@ build_webui("build") {
|
||||||
|
"languages_page/languages_util.ts",
|
||||||
|
"people_page/import_data_browser_proxy.ts",
|
||||||
|
"people_page/manage_profile_browser_proxy.ts",
|
||||||
|
+ "privacy_page/changelog_proxy.ts",
|
||||||
|
"system_page/system_page_browser_proxy.ts",
|
||||||
|
]
|
||||||
|
}
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
@@ -0,0 +1,47 @@
|
@@ -0,0 +1,81 @@
|
||||||
+<style include="cr-shared-style settings-shared">
|
+<style include="cr-shared-style settings-shared">
|
||||||
+ .label-wrapper {
|
+ .label-wrapper {
|
||||||
+ padding: var(--cr-section-vertical-padding) 0;
|
+ padding: var(--cr-section-vertical-padding) 0;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
|
+ #changelog-notice {
|
||||||
|
+ --cr-changelog-padding: 12px;
|
||||||
|
+ border-radius: var(--cr-changelog-padding);
|
||||||
|
+ margin: var(--cr-changelog-padding);
|
||||||
|
+ padding: var(--cr-changelog-padding);
|
||||||
|
+ background: rgba(10, 20, 50, 0.5)
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ #changelog-notice-actions {
|
||||||
|
+ --cr-checkbox-label-padding-start: 8px;
|
||||||
|
+ display: flex;
|
||||||
|
+ gap: 8px;
|
||||||
|
+ border-top: var(--cr-separator-line);
|
||||||
|
+ margin-top: calc(var(--cr-changelog-padding) / 2);
|
||||||
|
+ padding-top: calc(var(--cr-changelog-padding) / 2);
|
||||||
|
+ }
|
||||||
+</style>
|
+</style>
|
||||||
+
|
+
|
||||||
+<settings-subpage page-title="$i18n{heliumServicesTitle}" route-path$="[[routePath]]">
|
+<settings-subpage page-title="$i18n{heliumServicesTitle}" route-path$="[[routePath]]">
|
||||||
+<div class="cr-col first">
|
+<div class="cr-col first">
|
||||||
|
+ <template is="dom-if" if="[[changes_.length]]">
|
||||||
|
+ <div id="changelog-notice">
|
||||||
|
+ <div>$i18n{heliumSchemaUpdatedTitle}</div>
|
||||||
|
+ <ul>
|
||||||
|
+ <template is="dom-repeat" items="[[changes_]]" as="change">
|
||||||
|
+ <li>[[change]]</li>
|
||||||
|
+ </template>
|
||||||
|
+ </ul>
|
||||||
|
+ <div>$i18n{heliumSchemaUpdatedDescription}</div>
|
||||||
|
+ <div id="changelog-notice-actions">
|
||||||
|
+ <cr-button on-click="onAcknowledgedChangelog_">$i18n{heliumGotIt}</cr-button>
|
||||||
|
+ <cr-checkbox id="checkbox" checked="{{ignoreChecked_}}">
|
||||||
|
+ $i18n{heliumSchemaIgnore}
|
||||||
|
+ </cr-checkbox>
|
||||||
|
+ </div>
|
||||||
|
+ </div>
|
||||||
|
+ </template>
|
||||||
+ <settings-toggle-button id="servicesToggleButton"
|
+ <settings-toggle-button id="servicesToggleButton"
|
||||||
+ pref="{{prefs.helium.services.enabled}}"
|
+ pref="{{prefs.helium.services.enabled}}"
|
||||||
+ label="$i18n{heliumServicesToggle}"
|
+ label="$i18n{heliumServicesToggle}"
|
||||||
@@ -203,24 +258,29 @@
|
|||||||
+</settings-subpage>
|
+</settings-subpage>
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.ts
|
+++ b/chrome/browser/resources/settings/privacy_page/services_page.ts
|
||||||
@@ -0,0 +1,67 @@
|
@@ -0,0 +1,97 @@
|
||||||
+// Copyright 2025 The Helium Authors
|
+// Copyright 2025 The Helium Authors
|
||||||
+// You can use, redistribute, and/or modify this source code under
|
+// You can use, redistribute, and/or modify this source code under
|
||||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||||
+
|
+
|
||||||
+import {HelpBubbleMixin} from 'chrome://resources/cr_components/help_bubble/help_bubble_mixin.js';
|
|
||||||
+import {I18nMixin} from 'chrome://resources/cr_elements/i18n_mixin.js';
|
|
||||||
+import {PrefsMixin} from '/shared/settings/prefs/prefs_mixin.js';
|
+import {PrefsMixin} from '/shared/settings/prefs/prefs_mixin.js';
|
||||||
+import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
|
+import {HelpBubbleMixin} from 'chrome://resources/cr_components/help_bubble/help_bubble_mixin.js';
|
||||||
+import {getTemplate} from './services_page.html.js';
|
|
||||||
+import type {CrInputElement} from 'chrome://resources/cr_elements/cr_input/cr_input.js';
|
+import type {CrInputElement} from 'chrome://resources/cr_elements/cr_input/cr_input.js';
|
||||||
|
+import {I18nMixin} from 'chrome://resources/cr_elements/i18n_mixin.js';
|
||||||
|
+import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
|
||||||
|
+
|
||||||
|
+import type {HeliumServicesChangeHandler} from './changelog_proxy.js';
|
||||||
|
+import {HeliumServicesChangeHandlerImpl} from './changelog_proxy.js';
|
||||||
|
+import {getTemplate} from './services_page.html.js';
|
||||||
+
|
+
|
||||||
+const SettingsHeliumServicesPageElementBase =
|
+const SettingsHeliumServicesPageElementBase =
|
||||||
+ HelpBubbleMixin(I18nMixin(PrefsMixin(PolymerElement)));
|
+ HelpBubbleMixin(I18nMixin(PrefsMixin(PolymerElement)));
|
||||||
+
|
+
|
||||||
+export class SettingsHeliumServicesPageElement
|
+export class SettingsHeliumServicesPageElement extends
|
||||||
+ extends SettingsHeliumServicesPageElementBase
|
+ SettingsHeliumServicesPageElementBase {
|
||||||
+{
|
+ private changeProxy_: HeliumServicesChangeHandler =
|
||||||
|
+ HeliumServicesChangeHandlerImpl.getInstance();
|
||||||
|
+
|
||||||
+ static get is() {
|
+ static get is() {
|
||||||
+ return 'settings-helium-services-page';
|
+ return 'settings-helium-services-page';
|
||||||
+ }
|
+ }
|
||||||
@@ -230,9 +290,15 @@
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ static get properties() {
|
+ static get properties() {
|
||||||
+ return {};
|
+ return {
|
||||||
|
+ ignoreChecked_: Boolean,
|
||||||
|
+ changes_: Array,
|
||||||
|
+ };
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ declare private changes_: string[];
|
||||||
|
+ declare private ignoreChecked_: boolean;
|
||||||
|
+
|
||||||
+ private toOrigin(thing: string) {
|
+ private toOrigin(thing: string) {
|
||||||
+ try {
|
+ try {
|
||||||
+ return new URL(thing).origin;
|
+ return new URL(thing).origin;
|
||||||
@@ -241,6 +307,25 @@
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ private updateChangelogState(changes: string[]) {
|
||||||
|
+ this.changes_ = changes.flatMap(ch => ch.split('\n'));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private requestChangelog() {
|
||||||
|
+ this.changeProxy_.requestChangelog().then(
|
||||||
|
+ this.updateChangelogState.bind(this));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private onAcknowledgedChangelog_() {
|
||||||
|
+ this.changeProxy_.acknowledgeChanges(this.ignoreChecked_);
|
||||||
|
+ this.requestChangelog();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ override ready() {
|
||||||
|
+ super.ready();
|
||||||
|
+ this.requestChangelog();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ protected onOriginOverrideKeydown_(event: KeyboardEvent) {
|
+ protected onOriginOverrideKeydown_(event: KeyboardEvent) {
|
||||||
+ const target = event.target as CrInputElement;
|
+ const target = event.target as CrInputElement;
|
||||||
+
|
+
|
||||||
@@ -299,11 +384,13 @@
|
|||||||
#include "components/policy/core/common/policy_pref_names.h"
|
#include "components/policy/core/common/policy_pref_names.h"
|
||||||
#include "components/pref_registry/pref_registry_syncable.h"
|
#include "components/pref_registry/pref_registry_syncable.h"
|
||||||
#include "components/prefs/pref_registry_simple.h"
|
#include "components/prefs/pref_registry_simple.h"
|
||||||
@@ -204,6 +205,11 @@ void RegisterBrowserUserPrefs(user_prefs
|
@@ -204,6 +205,13 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||||
false);
|
false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
+ {
|
+ {
|
||||||
|
+ registry->RegisterIntegerPref(prefs::kHeliumSchemaVersion, 0);
|
||||||
|
+ registry->RegisterBooleanPref(prefs::kHeliumDisableSchemaAlerts, false);
|
||||||
+ registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
+ registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
||||||
+ registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
|
+ registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
|
||||||
+ }
|
+ }
|
||||||
@@ -336,7 +423,7 @@
|
|||||||
settings_api::PrefType::kBoolean;
|
settings_api::PrefType::kBoolean;
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/components/helium_services/BUILD.gn
|
+++ b/components/helium_services/BUILD.gn
|
||||||
@@ -0,0 +1,20 @@
|
@@ -0,0 +1,22 @@
|
||||||
+# Copyright 2025 The Helium Authors
|
+# Copyright 2025 The Helium Authors
|
||||||
+# You can use, redistribute, and/or modify this source code under
|
+# You can use, redistribute, and/or modify this source code under
|
||||||
+# the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
+# the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||||
@@ -346,6 +433,8 @@
|
|||||||
+ "helium_services_helpers.cc",
|
+ "helium_services_helpers.cc",
|
||||||
+ "helium_services_helpers.h",
|
+ "helium_services_helpers.h",
|
||||||
+ "pref_names.h",
|
+ "pref_names.h",
|
||||||
|
+ "schema.cc",
|
||||||
|
+ "schema.h",
|
||||||
+ ]
|
+ ]
|
||||||
+
|
+
|
||||||
+ public_deps = [
|
+ public_deps = [
|
||||||
@@ -359,7 +448,7 @@
|
|||||||
+}
|
+}
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/components/helium_services/helium_services_helpers.cc
|
+++ b/components/helium_services/helium_services_helpers.cc
|
||||||
@@ -0,0 +1,66 @@
|
@@ -0,0 +1,67 @@
|
||||||
+// Copyright 2025 The Helium Authors
|
+// Copyright 2025 The Helium Authors
|
||||||
+// You can use, redistribute, and/or modify this source code under
|
+// You can use, redistribute, and/or modify this source code under
|
||||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||||
@@ -422,13 +511,14 @@
|
|||||||
+ PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer) {
|
+ PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer) {
|
||||||
+ registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
+ registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
||||||
+ registrar.Add(prefs::kHeliumServicesOrigin, observer);
|
+ registrar.Add(prefs::kHeliumServicesOrigin, observer);
|
||||||
|
+ registrar.Add(prefs::kHeliumSchemaVersion, observer);
|
||||||
+ registrar.Add(pref_name, observer);
|
+ registrar.Add(pref_name, observer);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+} // namespace helium
|
+} // namespace helium
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/components/helium_services/helium_services_helpers.h
|
+++ b/components/helium_services/helium_services_helpers.h
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,30 @@
|
||||||
+// Copyright 2025 The Helium Authors
|
+// Copyright 2025 The Helium Authors
|
||||||
+// You can use, redistribute, and/or modify this source code under
|
+// You can use, redistribute, and/or modify this source code under
|
||||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||||
@@ -449,6 +539,8 @@
|
|||||||
+const char kHeliumDummyOrigin[] =
|
+const char kHeliumDummyOrigin[] =
|
||||||
+ "https://helium-services-are-disabled.qjz9zk";
|
+ "https://helium-services-are-disabled.qjz9zk";
|
||||||
+
|
+
|
||||||
|
+bool ShouldAccessServices(const PrefService& prefs);
|
||||||
|
+
|
||||||
+COMPONENT_EXPORT(HELIUM) GURL GetServicesBaseURL(const PrefService& prefs);
|
+COMPONENT_EXPORT(HELIUM) GURL GetServicesBaseURL(const PrefService& prefs);
|
||||||
+COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
|
+COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
|
||||||
+COMPONENT_EXPORT(HELIUM) std::optional<GURL> GetValidUserOverridenURL(std::string_view user_url_);
|
+COMPONENT_EXPORT(HELIUM) std::optional<GURL> GetValidUserOverridenURL(std::string_view user_url_);
|
||||||
@@ -459,7 +551,7 @@
|
|||||||
+#endif // COMPONENTS_HELIUM_SERVICES_HELIUM_SERVICES_HELPERS_H_
|
+#endif // COMPONENTS_HELIUM_SERVICES_HELIUM_SERVICES_HELPERS_H_
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/components/helium_services/pref_names.h
|
+++ b/components/helium_services/pref_names.h
|
||||||
@@ -0,0 +1,18 @@
|
@@ -0,0 +1,24 @@
|
||||||
+// Copyright 2025 The Helium Authors
|
+// Copyright 2025 The Helium Authors
|
||||||
+// You can use, redistribute, and/or modify this source code under
|
+// You can use, redistribute, and/or modify this source code under
|
||||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||||
@@ -469,6 +561,12 @@
|
|||||||
+
|
+
|
||||||
+namespace prefs {
|
+namespace prefs {
|
||||||
+
|
+
|
||||||
|
+inline constexpr char kHeliumSchemaVersion[] =
|
||||||
|
+ "helium.services.schema_version";
|
||||||
|
+
|
||||||
|
+inline constexpr char kHeliumDisableSchemaAlerts[] =
|
||||||
|
+ "helium.services.disable_schema_alerts";
|
||||||
|
+
|
||||||
+inline constexpr char kHeliumServicesEnabled[] =
|
+inline constexpr char kHeliumServicesEnabled[] =
|
||||||
+ "helium.services.enabled";
|
+ "helium.services.enabled";
|
||||||
+
|
+
|
||||||
@@ -478,3 +576,248 @@
|
|||||||
+} // namespace prefs
|
+} // namespace prefs
|
||||||
+
|
+
|
||||||
+#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
|
+#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/chrome/browser/resources/settings/privacy_page/changelog_proxy.ts
|
||||||
|
@@ -0,0 +1,40 @@
|
||||||
|
+// Copyright 2025 The Helium Authors
|
||||||
|
+// You can use, redistribute, and/or modify this source code under
|
||||||
|
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * @fileoverview A helper object used from the "Helium services" section
|
||||||
|
+ * to request a changelog (if one exists).
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+// clang-format off
|
||||||
|
+import {sendWithPromise} from 'chrome://resources/js/cr.js';
|
||||||
|
+// clang-format on
|
||||||
|
+
|
||||||
|
+export interface HeliumServicesChangeHandler {
|
||||||
|
+ // Get the pending changes to Helium services to announce
|
||||||
|
+ // to the user.
|
||||||
|
+ requestChangelog(): Promise<string[]>;
|
||||||
|
+ acknowledgeChanges(ignoreAllChangelogs: boolean): void;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+export class HeliumServicesChangeHandlerImpl implements
|
||||||
|
+ HeliumServicesChangeHandler {
|
||||||
|
+ requestChangelog() {
|
||||||
|
+ return sendWithPromise('getServicesSchemaChangelog');
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ acknowledgeChanges(ignoreAllChangelogs: boolean) {
|
||||||
|
+ chrome.send('updateServicesSchemaVersion', [ignoreAllChangelogs]);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ static getInstance(): HeliumServicesChangeHandler {
|
||||||
|
+ return instance || (instance = new HeliumServicesChangeHandlerImpl());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ static setInstance(obj: HeliumServicesChangeHandler) {
|
||||||
|
+ instance = obj;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+let instance: HeliumServicesChangeHandler|null = null;
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/chrome/browser/ui/webui/settings/services_schema_handler.h
|
||||||
|
@@ -0,0 +1,36 @@
|
||||||
|
+// Copyright 2025 The Helium Authors
|
||||||
|
+// You can use, redistribute, and/or modify this source code under
|
||||||
|
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||||
|
+
|
||||||
|
+#ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SERVICES_SCHEMA_HANDLER_H_
|
||||||
|
+#define CHROME_BROWSER_UI_WEBUI_SETTINGS_SERVICES_SCHEMA_HANDLER_H_
|
||||||
|
+
|
||||||
|
+#include <optional>
|
||||||
|
+#include <string>
|
||||||
|
+
|
||||||
|
+#include "base/memory/raw_ptr.h"
|
||||||
|
+#include "base/values.h"
|
||||||
|
+#include "content/public/browser/web_ui_message_handler.h"
|
||||||
|
+
|
||||||
|
+class Profile;
|
||||||
|
+class PrefService;
|
||||||
|
+
|
||||||
|
+class HeliumServicesSchemaHandler : public content::WebUIMessageHandler {
|
||||||
|
+ public:
|
||||||
|
+ explicit HeliumServicesSchemaHandler(Profile* profile);
|
||||||
|
+ HeliumServicesSchemaHandler(const HeliumServicesSchemaHandler&) = delete;
|
||||||
|
+ HeliumServicesSchemaHandler& operator=(const HeliumServicesSchemaHandler&) =
|
||||||
|
+ delete;
|
||||||
|
+ ~HeliumServicesSchemaHandler() override;
|
||||||
|
+
|
||||||
|
+ // SettingsPageUIHandler:
|
||||||
|
+ void RegisterMessages() override;
|
||||||
|
+
|
||||||
|
+ private:
|
||||||
|
+ void HandleChangelogRequest(const base::Value::List&);
|
||||||
|
+ void HandleChangelogAcknowledgment(const base::Value::List&);
|
||||||
|
+
|
||||||
|
+ raw_ptr<PrefService> pref_service_ = nullptr;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+#endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SERVICES_SCHEMA_HANDLER_H_
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/components/helium_services/schema.cc
|
||||||
|
@@ -0,0 +1,36 @@
|
||||||
|
+// Copyright 2025 The Helium Authors
|
||||||
|
+// You can use, redistribute, and/or modify this source code under
|
||||||
|
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||||
|
+
|
||||||
|
+#include "components/helium_services/schema.h"
|
||||||
|
+
|
||||||
|
+#include "components/helium_services/helium_services_helpers.h"
|
||||||
|
+#include "components/helium_services/pref_names.h"
|
||||||
|
+#include "components/prefs/pref_service.h"
|
||||||
|
+
|
||||||
|
+namespace helium {
|
||||||
|
+
|
||||||
|
+bool HasAcceptedSchema(const PrefService& prefs, int version) {
|
||||||
|
+ return prefs.GetBoolean(prefs::kHeliumDisableSchemaAlerts) ||
|
||||||
|
+ prefs.GetInteger(prefs::kHeliumSchemaVersion) >= version;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void AcceptCurrentSchema(PrefService& prefs) {
|
||||||
|
+ prefs.SetInteger(prefs::kHeliumSchemaVersion, kHeliumCurrentSchemaVersion);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+bool ShouldShowSchemaNotification(const PrefService& prefs) {
|
||||||
|
+ return ShouldAccessServices(prefs) &&
|
||||||
|
+ !HasAcceptedSchema(prefs, kHeliumCurrentSchemaVersion);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+ServicesChangelog& GetChangelog() {
|
||||||
|
+ static constexpr auto kHeliumSchemaChangelog =
|
||||||
|
+ base::MakeFixedFlatMap<int, std::string_view>({
|
||||||
|
+ {1, "TBA ____________________"}
|
||||||
|
+ });
|
||||||
|
+
|
||||||
|
+ return kHeliumSchemaChangelog;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+} // namespace helium
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/components/helium_services/schema.h
|
||||||
|
@@ -0,0 +1,30 @@
|
||||||
|
+// Copyright 2025 The Helium Authors
|
||||||
|
+// You can use, redistribute, and/or modify this source code under
|
||||||
|
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||||
|
+
|
||||||
|
+#ifndef COMPONENTS_HELIUM_SERVICES_SCHEMA_H_
|
||||||
|
+#define COMPONENTS_HELIUM_SERVICES_SCHEMA_H_
|
||||||
|
+
|
||||||
|
+#include "base/component_export.h"
|
||||||
|
+#include "base/containers/fixed_flat_map.h"
|
||||||
|
+#include "components/prefs/pref_service.h"
|
||||||
|
+
|
||||||
|
+namespace helium {
|
||||||
|
+
|
||||||
|
+inline constexpr int kHeliumCurrentSchemaVersion = 1;
|
||||||
|
+
|
||||||
|
+using ServicesChangelog = const base::
|
||||||
|
+ fixed_flat_map<int, std::string_view, kHeliumCurrentSchemaVersion>;
|
||||||
|
+
|
||||||
|
+#define EX COMPONENT_EXPORT(HELIUM)
|
||||||
|
+
|
||||||
|
+EX bool HasAcceptedSchema(const PrefService& prefs, int version);
|
||||||
|
+EX void AcceptCurrentSchema(PrefService& prefs);
|
||||||
|
+EX bool ShouldShowSchemaNotification(const PrefService& prefs);
|
||||||
|
+EX ServicesChangelog& GetChangelog();
|
||||||
|
+
|
||||||
|
+#undef EX
|
||||||
|
+
|
||||||
|
+} // namespace helium
|
||||||
|
+
|
||||||
|
+#endif // COMPONENTS_HELIUM_SERVICES_SCHEMA_H_
|
||||||
|
--- a/chrome/browser/ui/BUILD.gn
|
||||||
|
+++ b/chrome/browser/ui/BUILD.gn
|
||||||
|
@@ -1296,6 +1296,8 @@ static_library("ui") {
|
||||||
|
"webui/settings/saved_info_handler.h",
|
||||||
|
"webui/settings/search_engines_handler.cc",
|
||||||
|
"webui/settings/search_engines_handler.h",
|
||||||
|
+ "webui/settings/services_schema_handler.cc",
|
||||||
|
+ "webui/settings/services_schema_handler.h",
|
||||||
|
"webui/settings/settings_clear_browsing_data_handler.cc",
|
||||||
|
"webui/settings/settings_clear_browsing_data_handler.h",
|
||||||
|
"webui/settings/settings_localized_strings_privacy_sandbox_provider.cc",
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/chrome/browser/ui/webui/settings/services_schema_handler.cc
|
||||||
|
@@ -0,0 +1,58 @@
|
||||||
|
+// Copyright 2025 The Helium Authors
|
||||||
|
+// You can use, redistribute, and/or modify this source code under
|
||||||
|
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||||
|
+
|
||||||
|
+#include "chrome/browser/ui/webui/settings/services_schema_handler.h"
|
||||||
|
+
|
||||||
|
+#include "base/functional/bind.h"
|
||||||
|
+#include "base/values.h"
|
||||||
|
+#include "chrome/browser/profiles/profile.h"
|
||||||
|
+#include "components/helium_services/pref_names.h"
|
||||||
|
+#include "components/helium_services/schema.h"
|
||||||
|
+#include "components/prefs/pref_service.h"
|
||||||
|
+
|
||||||
|
+HeliumServicesSchemaHandler::HeliumServicesSchemaHandler(Profile* profile)
|
||||||
|
+ : pref_service_(profile->GetPrefs()) {}
|
||||||
|
+
|
||||||
|
+HeliumServicesSchemaHandler::~HeliumServicesSchemaHandler() = default;
|
||||||
|
+
|
||||||
|
+void HeliumServicesSchemaHandler::RegisterMessages() {
|
||||||
|
+ web_ui()->RegisterMessageCallback(
|
||||||
|
+ "getServicesSchemaChangelog",
|
||||||
|
+ base::BindRepeating(&HeliumServicesSchemaHandler::HandleChangelogRequest,
|
||||||
|
+ base::Unretained(this)));
|
||||||
|
+ web_ui()->RegisterMessageCallback(
|
||||||
|
+ "updateServicesSchemaVersion",
|
||||||
|
+ base::BindRepeating(
|
||||||
|
+ &HeliumServicesSchemaHandler::HandleChangelogAcknowledgment,
|
||||||
|
+ base::Unretained(this)));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void HeliumServicesSchemaHandler::HandleChangelogRequest(
|
||||||
|
+ const base::Value::List& args) {
|
||||||
|
+ CHECK_EQ(1U, args.size());
|
||||||
|
+ const auto& callback_id = args[0].GetString();
|
||||||
|
+ base::Value::List out;
|
||||||
|
+
|
||||||
|
+ if (helium::ShouldShowSchemaNotification(*pref_service_)) {
|
||||||
|
+ int user_version = pref_service_->GetInteger(prefs::kHeliumSchemaVersion);
|
||||||
|
+ auto& changelog = helium::GetChangelog();
|
||||||
|
+
|
||||||
|
+ for (auto it = changelog.upper_bound(user_version); it != changelog.end();
|
||||||
|
+ ++it) {
|
||||||
|
+ out.Append(it->second);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ AllowJavascript();
|
||||||
|
+ ResolveJavascriptCallback(base::Value(callback_id), std::move(out));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void HeliumServicesSchemaHandler::HandleChangelogAcknowledgment(
|
||||||
|
+ const base::Value::List& args) {
|
||||||
|
+ CHECK_EQ(1U, args.size());
|
||||||
|
+ bool ignore_alerts = args[0].GetBool();
|
||||||
|
+
|
||||||
|
+ helium::AcceptCurrentSchema(*pref_service_);
|
||||||
|
+ pref_service_->SetBoolean(prefs::kHeliumDisableSchemaAlerts, ignore_alerts);
|
||||||
|
+}
|
||||||
|
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||||
|
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||||
|
@@ -76,6 +76,7 @@
|
||||||
|
#include "chrome/browser/ui/webui/settings/safety_hub_handler.h"
|
||||||
|
#include "chrome/browser/ui/webui/settings/saved_info_handler.h"
|
||||||
|
#include "chrome/browser/ui/webui/settings/search_engines_handler.h"
|
||||||
|
+#include "chrome/browser/ui/webui/settings/services_schema_handler.h"
|
||||||
|
#include "chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h"
|
||||||
|
#include "chrome/browser/ui/webui/settings/settings_localized_strings_provider.h"
|
||||||
|
#include "chrome/browser/ui/webui/settings/settings_media_devices_selection_handler.h"
|
||||||
|
@@ -252,6 +253,8 @@ SettingsUI::SettingsUI(content::WebUI* w
|
||||||
|
AddSettingsPageUIHandler(std::make_unique<ProtocolHandlersHandler>(profile));
|
||||||
|
AddSettingsPageUIHandler(std::make_unique<PrivacySandboxHandler>());
|
||||||
|
AddSettingsPageUIHandler(std::make_unique<SearchEnginesHandler>(profile));
|
||||||
|
+ AddSettingsPageUIHandler(
|
||||||
|
+ std::make_unique<HeliumServicesSchemaHandler>(profile));
|
||||||
|
AddSettingsPageUIHandler(std::make_unique<SecureDnsHandler>());
|
||||||
|
AddSettingsPageUIHandler(std::make_unique<SiteSettingsHandler>(profile));
|
||||||
|
AddSettingsPageUIHandler(std::make_unique<StartupPagesHandler>(web_ui));
|
||||||
|
|||||||
232
patches/helium/core/services-schema-nag.patch
Normal file
232
patches/helium/core/services-schema-nag.patch
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
--- a/chrome/app/chromium_strings.grd
|
||||||
|
+++ b/chrome/app/chromium_strings.grd
|
||||||
|
@@ -956,6 +956,10 @@ Chromium is unable to recover your setti
|
||||||
|
Customize and control Chromium. Update is available.
|
||||||
|
</message>
|
||||||
|
|
||||||
|
+ <message name="IDS_APPMENU_TOOLTIP_HELIUM_SERVICES_UPDATE" desc="The tooltip to show for the browser menu when Helium Services schema changes">
|
||||||
|
+ Helium Services have been updated. Please confirm your settings.
|
||||||
|
+ </message>
|
||||||
|
+
|
||||||
|
<message name="IDS_APPMENU_TOOLTIP_ALERT" desc="The tooltip to show for the browser menu when a non-update alert is displayed">
|
||||||
|
Customize and control Chromium. Something needs your attention - click for details.
|
||||||
|
</message>
|
||||||
|
@@ -1620,6 +1624,11 @@ Chromium is unable to recover your setti
|
||||||
|
Chromium couldn't update to the latest version, so you're missing out on new features and security fixes.
|
||||||
|
</message>
|
||||||
|
|
||||||
|
+ <!-- Helium services schema change bubble -->
|
||||||
|
+ <message name="IDS_HELIUM_SERVICES_SCHEMA_MENU_ITEM" desc="Text for the bubble that notifies the user of a schema change in Helium Services.">
|
||||||
|
+ Review Helium services changes
|
||||||
|
+ </message>
|
||||||
|
+
|
||||||
|
<!-- User menu errors -->
|
||||||
|
<message name="IDS_SYNC_ERROR_USER_MENU_UPGRADE_BUTTON" desc="Button in the header of desktop user menu that prompts the user to update Chrome to fix the out-of-date Chrome client error.">
|
||||||
|
Update Chromium
|
||||||
|
--- a/chrome/app/generated_resources.grd
|
||||||
|
+++ b/chrome/app/generated_resources.grd
|
||||||
|
@@ -13186,6 +13186,9 @@ Check your passwords anytime in <ph name
|
||||||
|
<message name="IDS_APP_MENU_BUTTON_UPDATE" desc="Short label next to app-menu button when an update is available.">
|
||||||
|
Update
|
||||||
|
</message>
|
||||||
|
+ <message name="IDS_APP_MENU_BUTTON_HELIUM_SERVICES_UPDATE" desc="Short label next to app-menu button when Helium Services behavior changes.">
|
||||||
|
+ Services update
|
||||||
|
+ </message>
|
||||||
|
<if expr="is_win or is_macosx or is_linux">
|
||||||
|
<message name="IDS_APP_MENU_BUTTON_UPDATE_ALT1" desc="Alternate short label next to app-menu button when an update is available.">
|
||||||
|
Finish update
|
||||||
|
--- a/chrome/app/chrome_command_ids.h
|
||||||
|
+++ b/chrome/app/chrome_command_ids.h
|
||||||
|
@@ -301,6 +301,7 @@
|
||||||
|
#define IDC_SHOW_COMMENTS_SIDE_PANEL 40297
|
||||||
|
#define IDC_RECENT_TABS_SEE_DEVICE_TABS 40298
|
||||||
|
#define IDC_SHOW_AI_MODE_OMNIBOX_BUTTON 40299
|
||||||
|
+#define IDC_HELIUM_SERVICES_OPEN 40300
|
||||||
|
|
||||||
|
// Spell-check
|
||||||
|
// Insert any additional suggestions before _LAST; these have to be consecutive.
|
||||||
|
--- a/chrome/browser/ui/chrome_pages.h
|
||||||
|
+++ b/chrome/browser/ui/chrome_pages.h
|
||||||
|
@@ -138,6 +138,7 @@ void ShowSafeBrowsingEnhancedProtectionW
|
||||||
|
safe_browsing::SafeBrowsingSettingReferralMethod referral_method);
|
||||||
|
void ShowImportDialog(Browser* browser);
|
||||||
|
void ShowAboutChrome(Browser* browser);
|
||||||
|
+void ShowHeliumServices(Browser* browser);
|
||||||
|
void ShowSearchEngineSettings(Browser* browser);
|
||||||
|
void ShowWebStore(Browser* browser, std::string_view utm_source_value);
|
||||||
|
void ShowPrivacySandboxSettings(Browser* browser);
|
||||||
|
--- a/chrome/browser/ui/chrome_pages.cc
|
||||||
|
+++ b/chrome/browser/ui/chrome_pages.cc
|
||||||
|
@@ -615,6 +615,11 @@ void ShowAboutChrome(Browser* browser) {
|
||||||
|
ShowSingletonTabIgnorePathOverwriteNTP(browser, GURL(kChromeUIHelpURL));
|
||||||
|
}
|
||||||
|
|
||||||
|
+void ShowHeliumServices(Browser* browser) {
|
||||||
|
+ ShowSingletonTabIgnorePathOverwriteNTP(
|
||||||
|
+ browser, GURL("chrome://settings/privacy/services"));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void ShowSearchEngineSettings(Browser* browser) {
|
||||||
|
base::RecordAction(UserMetricsAction("EditSearchEngines"));
|
||||||
|
ShowSettingsSubPage(browser, kSearchEnginesSubPage);
|
||||||
|
--- a/chrome/browser/ui/browser_command_controller.cc
|
||||||
|
+++ b/chrome/browser/ui/browser_command_controller.cc
|
||||||
|
@@ -1067,6 +1067,9 @@ bool BrowserCommandController::ExecuteCo
|
||||||
|
case IDC_UPGRADE_DIALOG:
|
||||||
|
OpenUpdateChromeDialog(browser_);
|
||||||
|
break;
|
||||||
|
+ case IDC_HELIUM_SERVICES_OPEN:
|
||||||
|
+ ShowHeliumServices(browser_->GetBrowserForOpeningWebUi());
|
||||||
|
+ break;
|
||||||
|
case IDC_OPEN_SAFETY_HUB:
|
||||||
|
ShowSettingsSubPage(browser_->GetBrowserForOpeningWebUi(),
|
||||||
|
chrome::kSafetyHubSubPage);
|
||||||
|
@@ -1631,6 +1634,7 @@ void BrowserCommandController::InitComma
|
||||||
|
|
||||||
|
// These are always enabled; the menu determines their menu item visibility.
|
||||||
|
command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true);
|
||||||
|
+ command_updater_.UpdateCommandEnabled(IDC_HELIUM_SERVICES_OPEN, true);
|
||||||
|
command_updater_.UpdateCommandEnabled(IDC_SET_BROWSER_AS_DEFAULT, true);
|
||||||
|
|
||||||
|
// Safety Hub commands.
|
||||||
|
--- a/chrome/browser/ui/toolbar/app_menu_model.h
|
||||||
|
+++ b/chrome/browser/ui/toolbar/app_menu_model.h
|
||||||
|
@@ -281,6 +281,9 @@ class AppMenuModel : public ui::SimpleMe
|
||||||
|
// boolean indicating whether any menu items were added.
|
||||||
|
bool AddDefaultBrowserMenuItems();
|
||||||
|
|
||||||
|
+ // Adds a nag to review Helium Services permission changes
|
||||||
|
+ bool AddHeliumSchemaItem();
|
||||||
|
+
|
||||||
|
// Adds the Safety Hub menu notifications to the menu. Returns a boolean
|
||||||
|
// indicating whether any menu items were added.
|
||||||
|
[[nodiscard]] bool AddSafetyHubMenuItem();
|
||||||
|
--- a/chrome/browser/ui/toolbar/app_menu_model.cc
|
||||||
|
+++ b/chrome/browser/ui/toolbar/app_menu_model.cc
|
||||||
|
@@ -104,6 +104,7 @@
|
||||||
|
#include "components/dom_distiller/core/url_utils.h"
|
||||||
|
#include "components/feature_engagement/public/event_constants.h"
|
||||||
|
#include "components/feature_engagement/public/feature_constants.h"
|
||||||
|
+#include "components/helium_services/schema.h"
|
||||||
|
#include "components/lens/lens_features.h"
|
||||||
|
#include "components/omnibox/browser/vector_icons.h"
|
||||||
|
#include "components/password_manager/content/common/web_ui_constants.h"
|
||||||
|
@@ -2062,7 +2063,8 @@ bool AppMenuModel::AddGlobalErrorMenuIte
|
||||||
|
// how update the menu if new errors are added.
|
||||||
|
const GlobalErrorService::GlobalErrorList& errors =
|
||||||
|
GlobalErrorServiceFactory::GetForProfile(browser_->profile())->errors();
|
||||||
|
- bool menu_items_added = false;
|
||||||
|
+ bool menu_items_added = AddHeliumSchemaItem();
|
||||||
|
+
|
||||||
|
for (GlobalError* error : errors) {
|
||||||
|
DCHECK(error);
|
||||||
|
if (error->HasMenuItem()) {
|
||||||
|
@@ -2126,6 +2128,22 @@ bool AppMenuModel::AddSafetyHubMenuItem(
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool AppMenuModel::AddHeliumSchemaItem() {
|
||||||
|
+ if (!helium::ShouldShowSchemaNotification(
|
||||||
|
+ *browser()->profile()->GetPrefs())) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ const auto update_icon = ui::ImageModel::FromVectorIcon(
|
||||||
|
+ omnibox::kProductChromeRefreshIcon, ui::kColorMenuIcon, kDefaultIconSize);
|
||||||
|
+ AddItemWithIcon(
|
||||||
|
+ IDC_HELIUM_SERVICES_OPEN,
|
||||||
|
+ l10n_util::GetStringUTF16(IDS_HELIUM_SERVICES_SCHEMA_MENU_ITEM),
|
||||||
|
+ update_icon);
|
||||||
|
+
|
||||||
|
+ return true;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
#if BUILDFLAG(IS_CHROMEOS)
|
||||||
|
void AppMenuModel::UpdateSettingsItemState() {
|
||||||
|
bool is_disabled =
|
||||||
|
--- a/chrome/browser/ui/toolbar/app_menu_icon_controller.cc
|
||||||
|
+++ b/chrome/browser/ui/toolbar/app_menu_icon_controller.cc
|
||||||
|
@@ -8,11 +8,15 @@
|
||||||
|
#include "build/build_config.h"
|
||||||
|
#include "chrome/app/vector_icons/vector_icons.h"
|
||||||
|
#include "chrome/browser/defaults.h"
|
||||||
|
+#include "chrome/browser/profiles/profile.h"
|
||||||
|
#include "chrome/browser/ui/global_error/global_error.h"
|
||||||
|
#include "chrome/browser/ui/global_error/global_error_service_factory.h"
|
||||||
|
#include "chrome/browser/ui/ui_features.h"
|
||||||
|
#include "chrome/browser/upgrade_detector/upgrade_detector.h"
|
||||||
|
#include "chrome/common/channel_info.h"
|
||||||
|
+#include "components/helium_services/pref_names.h"
|
||||||
|
+#include "components/helium_services/schema.h"
|
||||||
|
+#include "components/prefs/pref_change_registrar.h"
|
||||||
|
#include "components/version_info/channel.h"
|
||||||
|
#include "ui/gfx/paint_vector_icon.h"
|
||||||
|
|
||||||
|
@@ -109,6 +113,14 @@ AppMenuIconController::AppMenuIconContro
|
||||||
|
GlobalErrorServiceFactory::GetForProfile(profile_));
|
||||||
|
|
||||||
|
upgrade_detector_->AddObserver(this);
|
||||||
|
+
|
||||||
|
+ if (auto* prefs = profile->GetPrefs()) {
|
||||||
|
+ registrar_.Init(prefs);
|
||||||
|
+ registrar_.Add(
|
||||||
|
+ prefs::kHeliumSchemaVersion,
|
||||||
|
+ base::BindRepeating(&AppMenuIconController::OnGlobalErrorsChanged,
|
||||||
|
+ base::Unretained(this)));
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
AppMenuIconController::~AppMenuIconController() {
|
||||||
|
@@ -141,6 +153,12 @@ AppMenuIconController::GetTypeAndSeverit
|
||||||
|
->GetHighestSeverityGlobalErrorWithAppMenuItem()) {
|
||||||
|
return {IconType::kGlobalError, SeverityFromError(error)};
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ if (auto* prefs = profile_->GetPrefs()) {
|
||||||
|
+ if (helium::ShouldShowSchemaNotification(*prefs)) {
|
||||||
|
+ return {IconType::kHeliumServicesUpdate, Severity::kLow};
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return {IconType::kNone, Severity::kNone};
|
||||||
|
--- a/chrome/browser/ui/toolbar/app_menu_icon_controller.h
|
||||||
|
+++ b/chrome/browser/ui/toolbar/app_menu_icon_controller.h
|
||||||
|
@@ -15,6 +15,7 @@
|
||||||
|
#include "chrome/browser/ui/global_error/global_error_observer.h"
|
||||||
|
#include "chrome/browser/ui/global_error/global_error_service.h"
|
||||||
|
#include "chrome/browser/upgrade_detector/upgrade_observer.h"
|
||||||
|
+#include "components/prefs/pref_change_registrar.h"
|
||||||
|
#include "third_party/skia/include/core/SkColor.h"
|
||||||
|
#include "ui/base/models/image_model.h"
|
||||||
|
|
||||||
|
@@ -29,6 +30,7 @@ class AppMenuIconController : public Glo
|
||||||
|
enum class IconType {
|
||||||
|
kNone,
|
||||||
|
kUpgradeNotification,
|
||||||
|
+ kHeliumServicesUpdate,
|
||||||
|
kGlobalError,
|
||||||
|
};
|
||||||
|
enum class Severity {
|
||||||
|
@@ -93,6 +95,7 @@ class AppMenuIconController : public Glo
|
||||||
|
const raw_ptr<Delegate> delegate_;
|
||||||
|
base::ScopedObservation<GlobalErrorService, GlobalErrorObserver>
|
||||||
|
global_error_observation_{this};
|
||||||
|
+ PrefChangeRegistrar registrar_;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CHROME_BROWSER_UI_TOOLBAR_APP_MENU_ICON_CONTROLLER_H_
|
||||||
|
--- a/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc
|
||||||
|
+++ b/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc
|
||||||
|
@@ -214,6 +214,11 @@ void BrowserAppMenuButton::UpdateTextAnd
|
||||||
|
#else
|
||||||
|
text = l10n_util::GetStringUTF16(IDS_APP_MENU_BUTTON_UPDATE);
|
||||||
|
#endif
|
||||||
|
+ } else if (type_and_severity_.type ==
|
||||||
|
+ AppMenuIconController::IconType::kHeliumServicesUpdate) {
|
||||||
|
+ tooltip_message_id = IDS_APPMENU_TOOLTIP_HELIUM_SERVICES_UPDATE;
|
||||||
|
+ text =
|
||||||
|
+ l10n_util::GetStringUTF16(IDS_APP_MENU_BUTTON_HELIUM_SERVICES_UPDATE);
|
||||||
|
} else {
|
||||||
|
tooltip_message_id = IDS_APPMENU_TOOLTIP_ALERT;
|
||||||
|
const int text_id =
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
||||||
--- a/components/helium_services/helium_services_helpers.h
|
--- a/components/helium_services/helium_services_helpers.h
|
||||||
+++ b/components/helium_services/helium_services_helpers.h
|
+++ b/components/helium_services/helium_services_helpers.h
|
||||||
@@ -21,12 +21,14 @@ const char kHeliumDummyOrigin[] =
|
@@ -23,12 +23,14 @@ bool ShouldAccessServices(const PrefServ
|
||||||
COMPONENT_EXPORT(HELIUM) bool ShouldFetchBangs(const PrefService& prefs);
|
COMPONENT_EXPORT(HELIUM) bool ShouldFetchBangs(const PrefService& prefs);
|
||||||
COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
|
COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
|
||||||
COMPONENT_EXPORT(HELIUM) bool ShouldAccessUpdateService(const PrefService& prefs);
|
COMPONENT_EXPORT(HELIUM) bool ShouldAccessUpdateService(const PrefService& prefs);
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
|
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
|
||||||
--- a/components/helium_services/pref_names.h
|
--- a/components/helium_services/pref_names.h
|
||||||
+++ b/components/helium_services/pref_names.h
|
+++ b/components/helium_services/pref_names.h
|
||||||
@@ -33,6 +33,8 @@ inline constexpr char kHeliumUpdateFetch
|
@@ -39,6 +39,8 @@ inline constexpr char kHeliumUpdateFetch
|
||||||
inline constexpr char kHeliumSpellcheckEnabled[] =
|
inline constexpr char kHeliumSpellcheckEnabled[] =
|
||||||
"helium.services.spellcheck_files";
|
"helium.services.spellcheck_files";
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
||||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||||
@@ -218,6 +218,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
@@ -220,6 +220,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
|
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
||||||
registry->RegisterBooleanPref(prefs::kHeliumUpdateFetchingEnabled, true);
|
registry->RegisterBooleanPref(prefs::kHeliumUpdateFetchingEnabled, true);
|
||||||
@@ -217,7 +217,7 @@
|
|||||||
if ( bin.assetSourceRegistry instanceof Object ) {
|
if ( bin.assetSourceRegistry instanceof Object ) {
|
||||||
--- a/chrome/app/settings_strings.grdp
|
--- a/chrome/app/settings_strings.grdp
|
||||||
+++ b/chrome/app/settings_strings.grdp
|
+++ b/chrome/app/settings_strings.grdp
|
||||||
@@ -2002,6 +2002,12 @@
|
@@ -2011,6 +2011,12 @@
|
||||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION" desc="Description of the toggle for automatic update downloads">
|
<message name="IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION" desc="Description of the toggle for automatic update downloads">
|
||||||
Helium will automatically download and install browser updates as they become available. We recommend keeping this setting enabled to ensure you get the latest security patches and features.
|
Helium will automatically download and install browser updates as they become available. We recommend keeping this setting enabled to ensure you get the latest security patches and features.
|
||||||
</message>
|
</message>
|
||||||
@@ -232,7 +232,7 @@
|
|||||||
</message>
|
</message>
|
||||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||||
@@ -69,6 +69,11 @@
|
@@ -103,6 +103,11 @@
|
||||||
sub-label="$i18n{heliumUpdatesToggleDescription}">
|
sub-label="$i18n{heliumUpdatesToggleDescription}">
|
||||||
</settings-toggle-button>
|
</settings-toggle-button>
|
||||||
</if>
|
</if>
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
</template>
|
</template>
|
||||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||||
@@ -2139,6 +2139,10 @@ void AddPrivacyStrings(content::WebUIDat
|
@@ -2143,6 +2143,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||||
IDS_SETTINGS_HELIUM_SERVICES_UPDATE},
|
IDS_SETTINGS_HELIUM_SERVICES_UPDATE},
|
||||||
{"heliumUpdatesToggleDescription",
|
{"heliumUpdatesToggleDescription",
|
||||||
IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION},
|
IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION},
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<message name="IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_LEARN_MORE_ACCESSIBILITY_LABEL" desc="The accessibility label for a link to learn more about Do Not Track">
|
<message name="IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_LEARN_MORE_ACCESSIBILITY_LABEL" desc="The accessibility label for a link to learn more about Do Not Track">
|
||||||
Learn more about Do Not Track
|
Learn more about Do Not Track
|
||||||
</message>
|
</message>
|
||||||
@@ -3207,6 +3210,9 @@
|
@@ -3216,6 +3219,9 @@
|
||||||
<message name="IDS_SETTINGS_TRACKING_PROTECTION_SITES_ALLOWED_COOKIES_DESCRIPTION" desc="Description of the section on the Tracking Protection settings page that lets users manage which sites are allowed to use third-party cookies. Explains how to use a wildcard to create an exception for an entire domain.">
|
<message name="IDS_SETTINGS_TRACKING_PROTECTION_SITES_ALLOWED_COOKIES_DESCRIPTION" desc="Description of the section on the Tracking Protection settings page that lets users manage which sites are allowed to use third-party cookies. Explains how to use a wildcard to create an exception for an entire domain.">
|
||||||
Affects the sites listed here. Inserting “[*.]” before a domain name creates an exception for the entire domain. For example, adding “[*.]google.com” means that third-party cookies can also be active for mail.google.com, because it’s part of google.com.
|
Affects the sites listed here. Inserting “[*.]” before a domain name creates an exception for the entire domain. For example, adding “[*.]google.com” means that third-party cookies can also be active for mail.google.com, because it’s part of google.com.
|
||||||
</message>
|
</message>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
{"doNotTrackDialogLearnMoreA11yLabel",
|
{"doNotTrackDialogLearnMoreA11yLabel",
|
||||||
IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_LEARN_MORE_ACCESSIBILITY_LABEL},
|
IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_LEARN_MORE_ACCESSIBILITY_LABEL},
|
||||||
// TODO(crbug.com/40122957): This string is no longer used. Remove.
|
// TODO(crbug.com/40122957): This string is no longer used. Remove.
|
||||||
@@ -2829,7 +2829,7 @@ void AddSiteSettingsStrings(content::Web
|
@@ -2833,7 +2833,7 @@ void AddSiteSettingsStrings(content::Web
|
||||||
{"trackingProtectionSitesAllowedCookiesTitle",
|
{"trackingProtectionSitesAllowedCookiesTitle",
|
||||||
IDS_SETTINGS_TRACKING_PROTECTION_SITES_ALLOWED_COOKIES_TITLE},
|
IDS_SETTINGS_TRACKING_PROTECTION_SITES_ALLOWED_COOKIES_TITLE},
|
||||||
{"trackingProtectionSitesAllowedCookiesDescription",
|
{"trackingProtectionSitesAllowedCookiesDescription",
|
||||||
|
|||||||
@@ -52,10 +52,10 @@
|
|||||||
-#else
|
-#else
|
||||||
text = l10n_util::GetStringUTF16(IDS_APP_MENU_BUTTON_UPDATE);
|
text = l10n_util::GetStringUTF16(IDS_APP_MENU_BUTTON_UPDATE);
|
||||||
-#endif
|
-#endif
|
||||||
} else {
|
} else if (type_and_severity_.type ==
|
||||||
tooltip_message_id = IDS_APPMENU_TOOLTIP_ALERT;
|
AppMenuIconController::IconType::kHeliumServicesUpdate) {
|
||||||
const int text_id =
|
tooltip_message_id = IDS_APPMENU_TOOLTIP_HELIUM_SERVICES_UPDATE;
|
||||||
@@ -228,37 +199,19 @@ void BrowserAppMenuButton::UpdateTextAnd
|
@@ -233,37 +204,19 @@ void BrowserAppMenuButton::UpdateTextAnd
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BrowserAppMenuButton::ShouldPaintBorder() const {
|
bool BrowserAppMenuButton::ShouldPaintBorder() const {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--- a/chrome/browser/ui/toolbar/app_menu_model.cc
|
--- a/chrome/browser/ui/toolbar/app_menu_model.cc
|
||||||
+++ b/chrome/browser/ui/toolbar/app_menu_model.cc
|
+++ b/chrome/browser/ui/toolbar/app_menu_model.cc
|
||||||
@@ -739,9 +739,6 @@ SaveAndShareSubMenuModel::SaveAndShareSu
|
@@ -740,9 +740,6 @@ SaveAndShareSubMenuModel::SaveAndShareSu
|
||||||
if (!sharing_hub::SharingIsDisabledByPolicy(browser->profile())) {
|
if (!sharing_hub::SharingIsDisabledByPolicy(browser->profile())) {
|
||||||
AddItemWithStringIdAndVectorIcon(
|
AddItemWithStringIdAndVectorIcon(
|
||||||
this, IDC_COPY_URL, IDS_APP_MENU_COPY_LINK, kLinkChromeRefreshIcon);
|
this, IDC_COPY_URL, IDS_APP_MENU_COPY_LINK, kLinkChromeRefreshIcon);
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
AddItemWithStringIdAndVectorIcon(this, IDC_QRCODE_GENERATOR,
|
AddItemWithStringIdAndVectorIcon(this, IDC_QRCODE_GENERATOR,
|
||||||
IDS_APP_MENU_CREATE_QR_CODE,
|
IDS_APP_MENU_CREATE_QR_CODE,
|
||||||
kQrCodeChromeRefreshIcon);
|
kQrCodeChromeRefreshIcon);
|
||||||
@@ -885,14 +882,6 @@ void ToolsMenuModel::Build(Browser* brow
|
@@ -886,14 +883,6 @@ void ToolsMenuModel::Build(Browser* brow
|
||||||
AddItemWithStringIdAndVectorIcon(this, IDC_NAME_WINDOW, IDS_NAME_WINDOW,
|
AddItemWithStringIdAndVectorIcon(this, IDC_NAME_WINDOW, IDS_NAME_WINDOW,
|
||||||
kNameWindowIcon);
|
kNameWindowIcon);
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
if (base::FeatureList::IsEnabled(contextual_tasks::kContextualTasks)) {
|
if (base::FeatureList::IsEnabled(contextual_tasks::kContextualTasks)) {
|
||||||
AddItemWithStringIdAndVectorIcon(
|
AddItemWithStringIdAndVectorIcon(
|
||||||
this, IDC_SHOW_CONTEXTUAL_TASKS_SIDE_PANEL,
|
this, IDC_SHOW_CONTEXTUAL_TASKS_SIDE_PANEL,
|
||||||
@@ -901,15 +890,6 @@ void ToolsMenuModel::Build(Browser* brow
|
@@ -902,15 +891,6 @@ void ToolsMenuModel::Build(Browser* brow
|
||||||
|
|
||||||
AddSeparator(ui::NORMAL_SEPARATOR);
|
AddSeparator(ui::NORMAL_SEPARATOR);
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
AddItemWithStringIdAndVectorIcon(this, IDC_PERFORMANCE, IDS_SHOW_PERFORMANCE,
|
AddItemWithStringIdAndVectorIcon(this, IDC_PERFORMANCE, IDS_SHOW_PERFORMANCE,
|
||||||
kPerformanceIcon);
|
kPerformanceIcon);
|
||||||
SetElementIdentifierAt(GetIndexOfCommandId(IDC_PERFORMANCE).value(),
|
SetElementIdentifierAt(GetIndexOfCommandId(IDC_PERFORMANCE).value(),
|
||||||
@@ -1760,22 +1740,8 @@ void AppMenuModel::Build() {
|
@@ -1761,22 +1741,8 @@ void AppMenuModel::Build() {
|
||||||
// Build (and, by extension, Init) should only be called once.
|
// Build (and, by extension, Init) should only be called once.
|
||||||
DCHECK_EQ(0u, GetItemCount());
|
DCHECK_EQ(0u, GetItemCount());
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
AddSeparator(ui::NORMAL_SEPARATOR);
|
AddSeparator(ui::NORMAL_SEPARATOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1812,43 +1778,6 @@ void AppMenuModel::Build() {
|
@@ -1813,43 +1779,6 @@ void AppMenuModel::Build() {
|
||||||
|
|
||||||
AddSeparator(ui::NORMAL_SEPARATOR);
|
AddSeparator(ui::NORMAL_SEPARATOR);
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
if (!browser_->profile()->IsOffTheRecord()) {
|
if (!browser_->profile()->IsOffTheRecord()) {
|
||||||
auto recent_tabs_sub_menu =
|
auto recent_tabs_sub_menu =
|
||||||
std::make_unique<RecentTabsSubMenuModel>(provider_, browser_);
|
std::make_unique<RecentTabsSubMenuModel>(provider_, browser_);
|
||||||
@@ -1870,7 +1799,7 @@ void AppMenuModel::Build() {
|
@@ -1871,7 +1800,7 @@ void AppMenuModel::Build() {
|
||||||
std::make_unique<BookmarkSubMenuModel>(this, browser_);
|
std::make_unique<BookmarkSubMenuModel>(this, browser_);
|
||||||
|
|
||||||
AddSubMenuWithStringIdAndVectorIcon(
|
AddSubMenuWithStringIdAndVectorIcon(
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
bookmark_sub_menu_model_.get(), kBookmarksListsMenuIcon);
|
bookmark_sub_menu_model_.get(), kBookmarksListsMenuIcon);
|
||||||
SetElementIdentifierAt(GetIndexOfCommandId(IDC_BOOKMARKS_MENU).value(),
|
SetElementIdentifierAt(GetIndexOfCommandId(IDC_BOOKMARKS_MENU).value(),
|
||||||
kBookmarksMenuItem);
|
kBookmarksMenuItem);
|
||||||
@@ -1887,23 +1816,10 @@ void AppMenuModel::Build() {
|
@@ -1888,23 +1817,10 @@ void AppMenuModel::Build() {
|
||||||
kTabGroupsMenuItem);
|
kTabGroupsMenuItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
|
|
||||||
AddItemWithStringIdAndVectorIcon(this, IDC_CLEAR_BROWSING_DATA,
|
AddItemWithStringIdAndVectorIcon(this, IDC_CLEAR_BROWSING_DATA,
|
||||||
IDS_CLEAR_BROWSING_DATA,
|
IDS_CLEAR_BROWSING_DATA,
|
||||||
@@ -1950,9 +1866,6 @@ void AppMenuModel::Build() {
|
@@ -1951,9 +1867,6 @@ void AppMenuModel::Build() {
|
||||||
lens::features::kLensOverlay));
|
lens::features::kLensOverlay));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
CreateFindAndEditSubMenu();
|
CreateFindAndEditSubMenu();
|
||||||
|
|
||||||
sub_menus_.push_back(
|
sub_menus_.push_back(
|
||||||
@@ -2001,6 +1914,12 @@ void AppMenuModel::Build() {
|
@@ -2002,6 +1915,12 @@ void AppMenuModel::Build() {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
AddItemWithStringIdAndVectorIcon(this, IDC_OPTIONS, IDS_SETTINGS,
|
AddItemWithStringIdAndVectorIcon(this, IDC_OPTIONS, IDS_SETTINGS,
|
||||||
kSettingsMenuIcon);
|
kSettingsMenuIcon);
|
||||||
|
|
||||||
@@ -2096,34 +2015,21 @@ bool AppMenuModel::AddDefaultBrowserMenu
|
@@ -2098,34 +2017,21 @@ bool AppMenuModel::AddDefaultBrowserMenu
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,12 +217,12 @@
|
|||||||
+ return false;
|
+ return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BUILDFLAG(IS_CHROMEOS)
|
bool AppMenuModel::AddHeliumSchemaItem() {
|
||||||
--- a/chrome/browser/ui/toolbar/app_menu_model.h
|
--- a/chrome/browser/ui/toolbar/app_menu_model.h
|
||||||
+++ b/chrome/browser/ui/toolbar/app_menu_model.h
|
+++ b/chrome/browser/ui/toolbar/app_menu_model.h
|
||||||
@@ -281,6 +281,9 @@ class AppMenuModel : public ui::SimpleMe
|
@@ -284,6 +284,9 @@ class AppMenuModel : public ui::SimpleMe
|
||||||
// boolean indicating whether any menu items were added.
|
// Adds a nag to review Helium Services permission changes
|
||||||
bool AddDefaultBrowserMenuItems();
|
bool AddHeliumSchemaItem();
|
||||||
|
|
||||||
+ // Adds a nag to relaunch the browser after an update
|
+ // Adds a nag to relaunch the browser after an update
|
||||||
+ bool AddUpgradeMenuItem();
|
+ bool AddUpgradeMenuItem();
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
};
|
};
|
||||||
--- a/chrome/app/generated_resources.grd
|
--- a/chrome/app/generated_resources.grd
|
||||||
+++ b/chrome/app/generated_resources.grd
|
+++ b/chrome/app/generated_resources.grd
|
||||||
@@ -13438,6 +13438,9 @@ Check your passwords anytime in <ph name
|
@@ -13441,6 +13441,9 @@ Check your passwords anytime in <ph name
|
||||||
<message name="IDS_EXTENSIONS_INSTALL_LOCATION_SHARED_MODULE" desc="The text explaining the the installation of the extension was because of extensions that depend on this shared module">
|
<message name="IDS_EXTENSIONS_INSTALL_LOCATION_SHARED_MODULE" desc="The text explaining the the installation of the extension was because of extensions that depend on this shared module">
|
||||||
Installed because of dependent extension(s).
|
Installed because of dependent extension(s).
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ helium/core/add-zen-importer.patch
|
|||||||
helium/core/disable-unsupported-importers.patch
|
helium/core/disable-unsupported-importers.patch
|
||||||
helium/core/fix-building-without-safebrowsing.patch
|
helium/core/fix-building-without-safebrowsing.patch
|
||||||
helium/core/services-prefs.patch
|
helium/core/services-prefs.patch
|
||||||
|
helium/core/services-schema-nag.patch
|
||||||
helium/core/override-chrome-protocol.patch
|
helium/core/override-chrome-protocol.patch
|
||||||
helium/core/onboarding-page.patch
|
helium/core/onboarding-page.patch
|
||||||
helium/core/change-chromium-branding.patch
|
helium/core/change-chromium-branding.patch
|
||||||
|
|||||||
Reference in New Issue
Block a user