Compare commits

..

22 Commits

Author SHA1 Message Date
wukko 5354646288 revision: bump to 4 (#607) 2025-12-12 16:46:36 +00:00
jj f03eea9638 extras: update onboarding (#605) 2025-12-12 17:12:54 +01:00
wukko 42e783c0bb merge: update to chromium 143.0.7499.109 (#601) 2025-12-12 18:14:27 +06:00
wukko 4cfbfe2710 patches: refresh for chromium 143.0.7499.109
removed upstream-fixes/fix-macos-fullscreen-ui-breakage.patch because it's been merged into M143 upstream :D
2025-12-12 18:11:24 +06:00
wukko 7c51e1f0f6 merge: update to ungoogled-chromium 143.0.7499.109 2025-12-12 18:11:24 +06:00
wukko b45d47cf07 extras: update onboarding (#603)
adds accommodations for the services schema & component updates
2025-12-12 12:08:40 +00:00
wukko c4482c5655 helium/core/services: component updates and schema 1 changelog (#591) 2025-12-12 18:00:15 +06:00
wukko 8930f2ae91 helium/core/services: add description & first changelog 2025-12-12 17:56:36 +06:00
wukko 714939df2c helium/core/components: descriptive helium services state error
now components show an error about disabled helium services if autoupdating is disabled
2025-12-12 17:35:32 +06:00
wukko db5ddc92c1 helium/core/components: restrict installation to an allowed set
just CRLSet for now. more to come in the future as we progressively vet them
2025-12-12 17:35:32 +06:00
wukko e64526ce10 helium/core: component updates via helium services
managed by the same toggle as general browser updates
2025-12-12 17:35:27 +06:00
wukko b82e2921d4 helium/core: add helium services versioning & update alerts (#599) 2025-12-12 15:34:03 +06:00
wukko a16ae4bd88 helium/core/services-nag: update strings 2025-12-12 14:00:23 +06:00
wukko 07018baf2e helium/core/services: polish the schema update notification
- adjusted padding, margins, and border radius
- made the title stand out more
- updated related strings
- removed the extra description, feels unnecessary to me
2025-12-12 13:59:46 +06:00
jj f4937943ca helium/core/onboarding: format and add "acceptLatestSchema" call 2025-12-11 23:43:48 +00:00
jj d27f87f754 helium/core: add helium services versioning/changelog
also move stringprintf import in helpers to correct patch
2025-12-11 23:43:48 +00:00
jj a2b3cd02bb devutils/lint: fix all_new_headers_have_correct_guard test 2025-12-11 23:43:48 +00:00
Blaise 20915c82d9 Update to Chromium 143.0.7499.109 2025-12-10 13:46:06 -06:00
wukko 7c45f2fcd6 revision: bump to 3 (#587) 2025-12-09 16:12:11 +00:00
wukko 8cb698e496 helium/ui/cat: fix order of early CAT layout return (#583)
fixes #576
2025-12-09 21:32:33 +06:00
wukko 009a2e74c7 helium/ui/cat: fix crash when opening the guest window (#577)
extensions container is nullptr there, so trying to set its flex property was causing a crash
2025-12-09 15:54:48 +06:00
jj 89699b019b patches/disable-crash-reporter: re-enable crashpad on Linux 2025-12-04 17:13:40 +00:00
38 changed files with 1235 additions and 544 deletions
+1 -1
View File
@@ -1 +1 @@
143.0.7499.40
143.0.7499.109
+2 -2
View File
@@ -101,11 +101,11 @@ def c_all_new_headers_have_correct_guard():
for _line in file[0]:
line = str(_line)
if '#ifndef' in line:
if expected["ifndef"] in line:
assert found["define"] is None
assert found["ifndef"] is None
found["ifndef"] = line
elif '#define' in line:
elif expected["define"] in line:
assert found["ifndef"] is not None
assert found["define"] is None
found["define"] = line
+2
View File
@@ -2155,6 +2155,7 @@ chrome/browser/ui/webui/management/management_ui_handler_unittest.cc
chrome/browser/ui/webui/media_router/cast_feedback_ui.cc
chrome/browser/ui/webui/nearby_internals/quick_pair/quick_pair_handler.cc
chrome/browser/ui/webui/new_tab_footer/new_tab_footer_handler_browsertest.cc
chrome/browser/ui/webui/new_tab_page/action_chips/action_chips_generator_unittest.cc
chrome/browser/ui/webui/new_tab_page/action_chips/action_chips_handler_unittest.cc
chrome/browser/ui/webui/new_tab_page/foo/foo_handler.cc
chrome/browser/ui/webui/new_tab_page/new_tab_page_handler_unittest.cc
@@ -8252,6 +8253,7 @@ third_party/devtools-frontend/src/front_end/panels/timeline/TimelineTreeView.ts
third_party/devtools-frontend/src/front_end/panels/timeline/TimelineUIUtils.test.ts
third_party/devtools-frontend/src/front_end/panels/timeline/TimingsTrackAppender.ts
third_party/devtools-frontend/src/front_end/panels/timeline/components/DetailsView.ts
third_party/devtools-frontend/src/front_end/panels/timeline/components/ExportTraceOptions.ts
third_party/devtools-frontend/src/front_end/panels/timeline/components/FieldSettingsDialog.ts
third_party/devtools-frontend/src/front_end/panels/timeline/components/LiveMetricsView.ts
third_party/devtools-frontend/src/front_end/panels/timeline/components/SidebarInsightsTab.test.ts
+2 -2
View File
@@ -7,10 +7,10 @@ sha256 = 00a87050fa3f941d04d67fb5763991e0b8ea399a88b505ab0e56dd263f06864c
output_path = ./third_party/search_engines_data/resources_internal
[onboarding]
version = 202511061712
version = 202512121537
url = https://github.com/imputnet/helium-onboarding/releases/download/%(version)s/helium-onboarding-%(version)s.tar.gz
download_filename = onboarding-page-%(version)s.tar.gz
sha256 = 5728d2c6806f3f918f7fd0b358935fd4daa34c1117703c564917ede1dac8e199
sha256 = d9729e4d160a2425d8bce36ab2e77588ec85e0f7ce6f5bdb8325997f1b5315fa
output_path = ./components/helium_onboarding
# If you are bumping this, you *NEED* to re-strip the assets.json
+7 -7
View File
@@ -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).
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
@@ -63,6 +63,7 @@
#include "chrome/browser/ui/webui/settings/font_handler.h"
#include "chrome/browser/ui/webui/settings/hats_handler.h"
#include "chrome/browser/ui/webui/settings/import_data_handler.h"
@@ -58,6 +58,7 @@
#include "chrome/browser/ui/webui/settings/about_handler.h"
#include "chrome/browser/ui/webui/settings/accessibility_main_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/metrics_reporting_handler.h"
#include "chrome/browser/ui/webui/settings/on_startup_handler.h"
#include "chrome/browser/ui/webui/settings/password_manager_handler.h"
#include "chrome/browser/ui/webui/settings/browser_lifetime_handler.h"
#include "chrome/browser/ui/webui/settings/downloads_handler.h"
#include "chrome/browser/ui/webui/settings/font_handler.h"
@@ -203,6 +204,7 @@ void SettingsUI::RegisterProfilePrefs(
registry->RegisterBooleanPref(prefs::kImportDialogHistory, true);
registry->RegisterBooleanPref(prefs::kImportDialogSavedPasswords, true);
+17 -17
View File
@@ -700,7 +700,7 @@
// Sanity check for https://crbug.com/781703.
--- a/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);
}
@@ -714,9 +714,9 @@
return GetDummyURL();
--- a/components/helium_services/helium_services_helpers.h
+++ b/components/helium_services/helium_services_helpers.h
@@ -18,6 +18,7 @@ const char kHeliumDefaultOrigin[] =
const char kHeliumDummyOrigin[] =
"https://helium-services-are-disabled.qjz9zk";
@@ -20,6 +20,7 @@ const char kHeliumDummyOrigin[] =
bool ShouldAccessServices(const PrefService& prefs);
+COMPONENT_EXPORT(HELIUM) bool ShouldFetchBangs(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
@@ -724,19 +724,19 @@
COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
--- a/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
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
{"heliumServicesToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
@@ -2134,6 +2134,9 @@ void AddPrivacyStrings(content::WebUIDat
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
{"heliumExtProxyToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION},
+ {"heliumBangsToggle", IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE},
+ {"heliumBangsToggleDescription",
+ IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION},
{"heliumExtProxyToggle",
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
{"heliumExtProxyToggleDescription",
{"heliumOriginOverride", IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE},
{"heliumOriginOverrideDescription",
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
--- a/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">
When enabled, Helium will proxy extension downloads and updates to protect your privacy. When disabled, downloading and updating extensions will not work.
</message>
@@ -751,7 +751,7 @@
</message>
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
@@ -50,6 +50,11 @@
@@ -92,6 +92,11 @@
label="$i18n{heliumExtProxyToggle}"
sub-label="$i18n{heliumExtProxyToggleDescription}">
</settings-toggle-button>
@@ -765,9 +765,9 @@
</template>
--- a/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::kHeliumBangsEnabled, true);
registry->RegisterBooleanPref(prefs::kHeliumExtProxyEnabled, true);
@@ -786,7 +786,7 @@
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/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[] =
"helium.services.ext_proxy";
@@ -1,8 +1,6 @@
TODO: guard services_page.html with is_mac
--- a/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[] =
"helium.services.bangs";
@@ -14,7 +12,7 @@ TODO: guard services_page.html with is_mac
--- a/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 ShouldAccessExtensionService(const PrefService& prefs);
@@ -30,15 +28,7 @@ TODO: guard services_page.html with is_mac
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
--- a/components/helium_services/helium_services_helpers.cc
+++ b/components/helium_services/helium_services_helpers.cc
@@ -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"
@@ -15,6 +16,12 @@
@@ -16,6 +16,12 @@
namespace helium {
@@ -51,7 +41,7 @@ TODO: guard services_page.html with is_mac
std::optional<GURL> GetValidUserOverridenURL(std::string_view user_url_) {
if (user_url_.empty()) {
return std::nullopt;
@@ -76,6 +83,11 @@ bool ShouldFetchBangs(const PrefService&
@@ -77,6 +83,11 @@ bool ShouldFetchBangs(const PrefService&
prefs.GetBoolean(prefs::kHeliumBangsEnabled);
}
@@ -63,7 +53,7 @@ TODO: guard services_page.html with is_mac
GURL GetExtensionUpdateURL(const PrefService& prefs) {
if (!ShouldAccessExtensionService(prefs)) {
return GetDummyURL();
@@ -101,6 +113,20 @@ GURL GetSpellcheckURL(const PrefService&
@@ -102,6 +113,20 @@ GURL GetSpellcheckURL(const PrefService&
return GetServicesBaseURL(prefs).Resolve("/dict/");
}
@@ -86,26 +76,24 @@ TODO: guard services_page.html with is_mac
registrar.Add(prefs::kHeliumServicesEnabled, observer);
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
@@ -62,6 +62,13 @@
@@ -104,6 +104,11 @@
sub-label="$i18n{heliumSpellcheckToggleDescription}">
</settings-toggle-button>
</if>
+ <if expr="is_macosx">
+ <settings-toggle-button id="updatesToggleButton"
+ pref="{{prefs.helium.services.browser_updates}}"
+ label="$i18n{heliumUpdatesToggle}"
+ sub-label="$i18n{heliumUpdatesToggleDescription}">
+ </settings-toggle-button>
+ </if>
+ <settings-toggle-button id="updatesToggleButton"
+ pref="{{prefs.helium.services.browser_updates}}"
+ label="$i18n{heliumUpdatesToggle}"
+ sub-label="$i18n{heliumUpdatesToggleDescription}">
+ </settings-toggle-button>
</cr-collapse>
</div>
</template>
--- a/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
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
{"heliumExtProxyToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION},
@@ -2140,6 +2140,10 @@ void AddPrivacyStrings(content::WebUIDat
{"heliumSpellcheckToggle", IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE},
{"heliumSpellcheckToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE_DESCRIPTION},
+ {"heliumUpdatesToggle",
+ IDS_SETTINGS_HELIUM_SERVICES_UPDATE},
+ {"heliumUpdatesToggleDescription",
@@ -126,7 +114,7 @@ TODO: guard services_page.html with is_mac
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/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->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
@@ -136,16 +124,23 @@ TODO: guard services_page.html with is_mac
registry->RegisterBooleanPref(
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -1996,6 +1996,12 @@
@@ -2005,6 +2005,19 @@
<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.
</message>
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_UPDATE" desc="Toggle for automatic update downloads">
+ Allow automatic browser updates
+ </message>
+ <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.
+ Allow automatic browser and component updates
+ </message>
+ <if expr="is_macosx">
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION" desc="Description of the toggle for automatic update downloads">
+ Helium will automatically download and install browser and component updates as they become available. We recommend keeping this setting enabled to ensure you get the latest features and security updates.
+ </message>
+ </if>
+ <if expr="not is_macosx">
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION" desc="Description of the toggle for automatic update downloads">
+ Helium will automatically download and install browser and component updates as they become available. We recommend keeping this setting enabled to ensure you get the latest features and security updates. Automatic core browser updates are not available on this platform yet, but component updates are. Please use external software to keep Helium up to date.
+ </message>
+ </if>
<message name="IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE" desc="Text input for overriding the Helium services server">
Use your own instance of Helium services
</message>
+220
View File
@@ -0,0 +1,220 @@
--- a/components/component_updater/component_updater_url_constants.cc
+++ b/components/component_updater/component_updater_url_constants.cc
@@ -15,9 +15,9 @@ namespace component_updater {
// The value of |kDefaultUrlSource| can be overridden with
// --component-updater=url-source=someurl.
const char kUpdaterJSONDefaultUrl[] =
- "https://update.googleapis.com/service/update2/json";
+ "trk:345:https://update.googleapis.com/service/update2/json";
const char kUpdaterJSONFallbackUrl[] =
- "http://update.googleapis.com/service/update2/json";
+ "trk:346:http://update.googleapis.com/service/update2/json";
} // namespace component_updater
--- a/components/helium_services/helium_services_helpers.cc
+++ b/components/helium_services/helium_services_helpers.cc
@@ -9,6 +9,7 @@
#include "base/functional/bind.h"
#include "base/strings/stringprintf.h"
#include "components/helium_services/pref_names.h"
+#include "components/helium_services/schema.h"
#include "components/prefs/pref_service.h"
#include "net/base/url_util.h"
#include "url/gurl.h"
@@ -88,6 +89,12 @@ bool ShouldAccessUpdateService(const Pre
prefs.GetBoolean(prefs::kHeliumUpdateFetchingEnabled);
}
+bool ShouldAccessComponentUpdateService(const PrefService& prefs) {
+ return ShouldAccessServices(prefs) &&
+ HasAcceptedSchema(prefs, 1) &&
+ prefs.GetBoolean(prefs::kHeliumUpdateFetchingEnabled);
+}
+
bool ShouldAccessUBlockAssets(const PrefService& prefs) {
return ShouldAccessServices(prefs) &&
prefs.GetBoolean(prefs::kHeliumUBlockAssetsEnabled);
@@ -132,6 +139,14 @@ GURL GetBrowserUpdateURL(const PrefServi
#endif
}
+GURL GetComponentUpdateURL(const PrefService* prefs) {
+ if (!prefs || !ShouldAccessComponentUpdateService(*prefs)) {
+ return GetDummyURL();
+ }
+
+ return GetServicesBaseURL(*prefs).Resolve("/com");
+}
+
GURL GetUBlockAssetsURL(const PrefService& prefs) {
if (!ShouldAccessUBlockAssets(prefs)) {
return GetDummyURL();
--- a/components/helium_services/helium_services_helpers.h
+++ b/components/helium_services/helium_services_helpers.h
@@ -23,6 +23,7 @@ bool ShouldAccessServices(const PrefServ
COMPONENT_EXPORT(HELIUM) bool ShouldFetchBangs(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) bool ShouldAccessUpdateService(const PrefService& prefs);
+COMPONENT_EXPORT(HELIUM) bool ShouldAccessComponentUpdateService(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) bool ShouldAccessUBlockAssets(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) GURL GetServicesBaseURL(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
@@ -30,6 +31,7 @@ COMPONENT_EXPORT(HELIUM) GURL GetExtensi
COMPONENT_EXPORT(HELIUM) GURL GetWebstoreSnippetURL(const PrefService& prefs, std::string_view id);
COMPONENT_EXPORT(HELIUM) GURL GetSpellcheckURL(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) GURL GetBrowserUpdateURL(const PrefService& prefs);
+COMPONENT_EXPORT(HELIUM) GURL GetComponentUpdateURL(const PrefService* prefs);
COMPONENT_EXPORT(HELIUM) GURL GetUBlockAssetsURL(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) std::optional<GURL> GetValidUserOverridenURL(std::string_view user_url_);
COMPONENT_EXPORT(HELIUM) void ConfigurePrefChangeRegistrarFor(std::string_view pref_name,
--- a/chrome/browser/component_updater/chrome_component_updater_configurator.cc
+++ b/chrome/browser/component_updater/chrome_component_updater_configurator.cc
@@ -26,11 +26,14 @@
#include "chrome/browser/component_updater/component_updater_utils.h"
#include "chrome/browser/component_updater/updater_state.h"
#include "chrome/browser/net/system_network_context_manager.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_paths.h"
#include "components/component_updater/component_updater_command_line_config_policy.h"
#include "components/component_updater/configurator_impl.h"
+#include "components/helium_services/helium_services_helpers.h"
#include "components/prefs/pref_service.h"
#include "components/services/patch/content/patch_service.h"
#include "components/services/unzip/content/unzip_service.h"
@@ -55,6 +58,26 @@
namespace component_updater {
namespace {
+PrefService* GetProfilePrefs() {
+ // Browser process and profile manager are usually
+ // not null, but they may be during tests.
+ if (!g_browser_process) {
+ return nullptr;
+ }
+
+ ProfileManager* pm = g_browser_process->profile_manager();
+ if (!pm) {
+ return nullptr;
+ }
+
+ Profile* profile = pm->GetLastUsedProfileIfLoaded();
+ if (!profile) {
+ return nullptr;
+ }
+
+ return profile->GetPrefs();
+}
+
class ChromeConfigurator : public update_client::Configurator {
public:
ChromeConfigurator(const base::CommandLine* cmdline,
@@ -154,12 +177,12 @@ base::TimeDelta ChromeConfigurator::Upda
std::vector<GURL> ChromeConfigurator::UpdateUrl() const {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- return configurator_impl_.UpdateUrl();
+ return {helium::GetComponentUpdateURL(GetProfilePrefs())};
}
std::vector<GURL> ChromeConfigurator::PingUrl() const {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- return configurator_impl_.PingUrl();
+ return {helium::GetComponentUpdateURL(GetProfilePrefs())};
}
std::string ChromeConfigurator::GetProdId() const {
--- a/components/component_updater/component_installer.cc
+++ b/components/component_updater/component_installer.cc
@@ -12,6 +12,7 @@
#include <utility>
#include <vector>
+#include "base/containers/fixed_flat_set.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -111,7 +112,21 @@ void ComponentInstaller::Register(Compon
std::vector<uint8_t> public_key_hash;
installer_policy_->GetHash(&public_key_hash);
+
+ static constexpr auto kAllowedComponents =
+ base::MakeFixedFlatSet<std::string_view>(
+ base::sorted_unique,
+ {
+ "hfnkpimlhhgieaddgfemjhofmfblmnib", // CRLSet
+ }
+ );
+
const auto crx_id = update_client::GetCrxIdFromPublicKeyHash(public_key_hash);
+
+ if (!kAllowedComponents.contains(crx_id)) {
+ return;
+ }
+
Register(base::BindOnce(&ComponentUpdateService::RegisterComponent,
base::Unretained(cus)),
std::move(callback), cus->GetRegisteredVersion(crx_id),
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6957,6 +6957,9 @@ Keep your key file in a safe place. You
<message name="IDS_COMPONENTS_SVC_STATUS_UPDATE_ERROR" desc="Service Status">
Update error
</message>
+ <message name="IDS_COMPONENTS_SVC_STATUS_ERROR_HELIUM_SERVICES" desc="Service Status">
+ Component updates are disabled. See Helium services in settings.
+ </message>
<message name="IDS_COMPONENTS_UNKNOWN" desc="Service Status">
Unknown
</message>
--- a/chrome/browser/ui/webui/components/components_handler.cc
+++ b/chrome/browser/ui/webui/components/components_handler.cc
@@ -12,8 +12,12 @@
#include "base/notreached.h"
#include "base/values.h"
#include "build/build_config.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/grit/generated_resources.h"
+#include "components/helium_services/helium_services_helpers.h"
+#include "components/prefs/pref_service.h"
#include "components/update_client/crx_update_item.h"
+#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
ComponentsHandler::ComponentsHandler(
@@ -82,6 +86,20 @@ void ComponentsHandler::OnEvent(const up
std::u16string ComponentsHandler::ServiceStatusToString(
update_client::ComponentState state) {
+
+ if (state == update_client::ComponentState::kUpdateError) {
+ Profile* profile = Profile::FromBrowserContext(
+ web_ui()->GetWebContents()->GetBrowserContext());
+
+ if (profile) {
+ PrefService* prefs = profile->GetPrefs();
+ if (prefs && !helium::ShouldAccessComponentUpdateService(*prefs)) {
+ return l10n_util::GetStringUTF16(
+ IDS_COMPONENTS_SVC_STATUS_ERROR_HELIUM_SERVICES);
+ }
+ }
+ }
+
switch (state) {
case update_client::ComponentState::kNew:
return l10n_util::GetStringUTF16(IDS_COMPONENTS_SVC_STATUS_NEW);
--- a/chrome/browser/ui/webui/components/components_handler.h
+++ b/chrome/browser/ui/webui/components/components_handler.h
@@ -40,7 +40,7 @@ class ComponentsHandler : public content
void OnEvent(const update_client::CrxUpdateItem& item) override;
private:
- static std::u16string ServiceStatusToString(
+ std::u16string ServiceStatusToString(
update_client::ComponentState state);
base::Value::List LoadComponents();
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -13643,11 +13643,328 @@ const FeatureEntry kFeatureEntries[] = {
@@ -13652,11 +13652,328 @@ const FeatureEntry kFeatureEntries[] = {
// AboutFlagsHistogramTest unit test to verify this process).
};
@@ -330,7 +330,7 @@
FlagsStateSingleton(const FlagsStateSingleton&) = delete;
FlagsStateSingleton& operator=(const FlagsStateSingleton&) = delete;
~FlagsStateSingleton() override = default;
@@ -13666,7 +13983,7 @@ class FlagsStateSingleton : public flags
@@ -13675,7 +13992,7 @@ class FlagsStateSingleton : public flags
void RestoreDefaultState() {
flags_state_ =
@@ -339,7 +339,7 @@
}
private:
@@ -13990,7 +14307,7 @@ base::span<const FeatureEntry> GetFeatur
@@ -13999,7 +14316,7 @@ base::span<const FeatureEntry> GetFeatur
!entries_for_testing->empty()) {
return *entries_for_testing;
}
+1 -1
View File
@@ -15,7 +15,7 @@
#endif // USE_AURA
#if defined(USE_AURA)
@@ -5200,11 +5200,13 @@ const FeatureEntry::FeatureVariation kPr
@@ -5207,11 +5207,13 @@ const FeatureEntry::FeatureVariation kPr
// calculate and verify checksum.
//
// When adding a new choice, add it to the end of the list.
+2 -2
View File
@@ -51,7 +51,7 @@
}
void BrowserCommandController::TabStateChanged() {
@@ -1176,6 +1178,14 @@ bool BrowserCommandController::ExecuteCo
@@ -1179,6 +1181,14 @@ bool BrowserCommandController::ExecuteCo
case IDC_DUPLICATE_TARGET_TAB:
DuplicateKeyboardFocusedTab(browser_);
break;
@@ -66,7 +66,7 @@
// Hosted App commands
case IDC_COPY_URL:
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(
profile(), browser_->tab_strip_model()->GetActiveWebContents());
+168 -169
View File
@@ -1,8 +1,8 @@
--- a/components/helium_services/pref_names.h
+++ b/components/helium_services/pref_names.h
@@ -7,12 +7,20 @@
namespace prefs {
@@ -13,12 +13,20 @@ inline constexpr char kHeliumSchemaVersi
inline constexpr char kHeliumDisableSchemaAlerts[] =
"helium.services.disable_schema_alerts";
+inline constexpr char kHeliumPrefPrefix[] = "helium.";
+
@@ -23,8 +23,8 @@
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
--- a/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->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
+ registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
@@ -160,36 +160,36 @@
+
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/webui/onboarding/onboarding_handler.h"
+#include "chrome/browser/ui/webui/settings/brave_import_data_handler.h"
+#include "chrome/browser/ui/webui/settings/search_engines_handler.h"
+#include "chrome/browser/ui/webui/settings/settings_default_browser_handler.h"
+#include "chrome/browser/ui/webui/settings/brave_import_data_handler.h"
+#include "chrome/common/webui_url_constants.h"
+#include "content/public/browser/web_ui_controller.h"
+#include "content/public/browser/web_ui_data_source.h"
+#include "components/helium_onboarding/resources/grit/helium_onboarding_generated.h"
+#include "components/helium_onboarding/resources/grit/helium_onboarding_generated_map.h"
+#include "content/public/browser/web_ui_controller.h"
+#include "content/public/browser/web_ui_data_source.h"
+#include "ui/webui/webui_util.h"
+
+HeliumOnboardingPage::HeliumOnboardingPage(content::WebUI* web_ui) : WebUIController(web_ui) {
+ Profile* profile = Profile::FromWebUI(web_ui);
+ content::WebUIDataSource* source =
+ content::WebUIDataSource::CreateAndAdd(profile, chrome::kHeliumSetupHost);
+HeliumOnboardingPage::HeliumOnboardingPage(content::WebUI* web_ui)
+ : WebUIController(web_ui) {
+ Profile* profile = Profile::FromWebUI(web_ui);
+ content::WebUIDataSource* source =
+ content::WebUIDataSource::CreateAndAdd(profile, chrome::kHeliumSetupHost);
+
+ webui::SetupWebUIDataSource(
+ source, kHeliumOnboardingGenerated,
+ IDR_HELIUM_ONBOARDING_INDEX_HTML);
+ webui::SetupWebUIDataSource(source, kHeliumOnboardingGenerated,
+ IDR_HELIUM_ONBOARDING_INDEX_HTML);
+
+ source->UseStringsJs();
+ source->DisableTrustedTypesCSP();
+ source->UseStringsJs();
+ source->DisableTrustedTypesCSP();
+
+ web_ui->AddMessageHandler(
+ std::make_unique<OnboardingMessageHandler>(profile));
+ web_ui->AddMessageHandler(
+ std::make_unique<settings::SearchEnginesHandler>(profile));
+ web_ui->AddMessageHandler(
+ std::make_unique<settings::DefaultBrowserHandler>());
+ web_ui->AddMessageHandler(
+ std::make_unique<settings::BraveImportDataHandler>());
+ web_ui->AddMessageHandler(
+ std::make_unique<OnboardingMessageHandler>(profile));
+ web_ui->AddMessageHandler(
+ std::make_unique<settings::SearchEnginesHandler>(profile));
+ web_ui->AddMessageHandler(
+ std::make_unique<settings::DefaultBrowserHandler>());
+ web_ui->AddMessageHandler(
+ std::make_unique<settings::BraveImportDataHandler>());
+}
+
+HeliumOnboardingPage::~HeliumOnboardingPage() = default;
@@ -204,8 +204,8 @@
+#define CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_PAGE_UI_H_
+
+#include "chrome/common/webui_url_constants.h"
+#include "content/public/browser/webui_config.h"
+#include "content/public/browser/web_ui_controller.h"
+#include "content/public/browser/webui_config.h"
+
+class HeliumOnboardingPage;
+
@@ -213,23 +213,23 @@
+ : public content::DefaultWebUIConfig<HeliumOnboardingPage> {
+ public:
+ HeliumOnboardingPageConfig()
+ : DefaultWebUIConfig(content::kChromeUIScheme,
+ chrome::kHeliumSetupHost) {}
+ : DefaultWebUIConfig(content::kChromeUIScheme, chrome::kHeliumSetupHost) {
+ }
+};
+
+class HeliumOnboardingPage : public content::WebUIController {
+public:
+ explicit HeliumOnboardingPage(content::WebUI* web_ui);
+ public:
+ explicit HeliumOnboardingPage(content::WebUI* web_ui);
+
+ HeliumOnboardingPage(const HeliumOnboardingPage&) = delete;
+ HeliumOnboardingPage& operator=(const HeliumOnboardingPage&) = delete;
+ ~HeliumOnboardingPage() override;
+ HeliumOnboardingPage(const HeliumOnboardingPage&) = delete;
+ HeliumOnboardingPage& operator=(const HeliumOnboardingPage&) = delete;
+ ~HeliumOnboardingPage() override;
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_PAGE_UI_H_
+#endif // CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_PAGE_UI_H_
--- /dev/null
+++ b/chrome/browser/ui/webui/onboarding/onboarding_handler.cc
@@ -0,0 +1,190 @@
@@ -0,0 +1,188 @@
+// 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.
@@ -248,6 +248,7 @@
+#include "chrome/browser/themes/theme_service_factory.h"
+#include "chrome/browser/ui/color/chrome_color_id.h"
+#include "components/helium_services/pref_names.h"
+#include "components/helium_services/schema.h"
+#include "components/prefs/pref_change_registrar.h"
+#include "components/prefs/pref_service.h"
+#include "content/public/browser/web_contents.h"
@@ -255,174 +256,171 @@
+#include "ui/gfx/color_utils.h"
+
+OnboardingMessageHandler::OnboardingMessageHandler(Profile* profile)
+ : profile_(profile),
+ pref_service_(profile->GetPrefs()) {
+ pref_change_registrar_.Init(pref_service_);
+ : profile_(profile), pref_service_(profile->GetPrefs()) {
+ pref_change_registrar_.Init(pref_service_);
+
+ for (const auto [ key, _ ] : GetPreferencesDict()) {
+ pref_change_registrar_.Add(
+ prefs::kHeliumPrefPrefix + key,
+ base::BindRepeating(
+ &OnboardingMessageHandler::OnPreferencesChanged,
+ base::Unretained(this)
+ )
+ );
+ }
+ for (const auto [key, _] : GetPreferencesDict()) {
+ pref_change_registrar_.Add(
+ prefs::kHeliumPrefPrefix + key,
+ base::BindRepeating(&OnboardingMessageHandler::OnPreferencesChanged,
+ base::Unretained(this)));
+ }
+
+ ThemeServiceFactory::GetForProfile(profile_)->AddObserver(this);
+ ThemeServiceFactory::GetForProfile(profile_)->AddObserver(this);
+}
+
+OnboardingMessageHandler::~OnboardingMessageHandler() {
+ ThemeServiceFactory::GetForProfile(profile_)->RemoveObserver(this);
+ ThemeServiceFactory::GetForProfile(profile_)->RemoveObserver(this);
+}
+
+base::Value::Dict OnboardingMessageHandler::GetPreferencesDict() {
+ std::vector<PrefService::PreferenceValueAndStore> values =
+ pref_service_->GetPreferencesValueAndStore();
+ base::Value::Dict output;
+ std::vector<PrefService::PreferenceValueAndStore> values =
+ pref_service_->GetPreferencesValueAndStore();
+ base::Value::Dict output;
+
+ for (const auto& [name, value, _] : values) {
+ if (!base::StartsWith(name, prefs::kHeliumPrefPrefix,
+ base::CompareCase::SENSITIVE)) {
+ continue;
+ }
+
+ output.Set(
+ name.substr(sizeof(prefs::kHeliumPrefPrefix) - 1),
+ value.Clone()
+ );
+ for (const auto& [name, value, _] : values) {
+ if (!base::StartsWith(name, prefs::kHeliumPrefPrefix,
+ base::CompareCase::SENSITIVE)) {
+ continue;
+ }
+
+ return output;
+ output.Set(name.substr(sizeof(prefs::kHeliumPrefPrefix) - 1),
+ value.Clone());
+ }
+
+ return output;
+}
+
+void OnboardingMessageHandler::OnThemeChanged() {
+ AllowJavascript();
+ FireWebUIListener("ntp-background-changed", GetNTPBackgroundColor());
+ AllowJavascript();
+ FireWebUIListener("ntp-background-changed", GetNTPBackgroundColor());
+}
+
+void OnboardingMessageHandler::OnPreferencesChanged() {
+ AllowJavascript();
+ FireWebUIListener("helium-prefs-changed", GetPreferencesDict());
+ AllowJavascript();
+ FireWebUIListener("helium-prefs-changed", GetPreferencesDict());
+}
+
+void OnboardingMessageHandler::RegisterMessages() {
+ web_ui()->RegisterMessageCallback(
+ "getPrefs",
+ base::BindRepeating(&OnboardingMessageHandler::HandleGetPreferences,
+ base::Unretained(this)));
+
+ web_ui()->RegisterMessageCallback(
+ "setPref",
+ base::BindRepeating(&OnboardingMessageHandler::HandleSetPreference,
+ base::Unretained(this)));
+
+ web_ui()->RegisterMessageCallback(
+ "getProfileName",
+ base::BindRepeating(&OnboardingMessageHandler::HandleGetProfileName,
+ base::Unretained(this)));
+
+ web_ui()->RegisterMessageCallback(
+ "setProfileName",
+ base::BindRepeating(&OnboardingMessageHandler::HandleSetProfileName,
+ base::Unretained(this)));
+
+ web_ui()->RegisterMessageCallback(
+ "getBackgroundColor",
+ base::BindRepeating(&OnboardingMessageHandler::HandleGetBackgroundColor,
+ base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "getPrefs",
+ base::BindRepeating(&OnboardingMessageHandler::HandleGetPreferences,
+ base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "setPref",
+ base::BindRepeating(&OnboardingMessageHandler::HandleSetPreference,
+ base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "acceptLatestSchema",
+ base::BindRepeating(&OnboardingMessageHandler::HandleAcceptSchema,
+ base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "getProfileName",
+ base::BindRepeating(&OnboardingMessageHandler::HandleGetProfileName,
+ base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "setProfileName",
+ base::BindRepeating(&OnboardingMessageHandler::HandleSetProfileName,
+ base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "getBackgroundColor",
+ base::BindRepeating(&OnboardingMessageHandler::HandleGetBackgroundColor,
+ base::Unretained(this)));
+}
+
+base::Value OnboardingMessageHandler::GetNTPBackgroundColor() {
+ return base::Value(
+ color_utils::SkColorToRgbaString(
+ web_ui()
+ ->GetWebContents()
+ ->GetColorProvider().GetColor(kColorNewTabPageBackground)
+ )
+ );
+ return base::Value(color_utils::SkColorToRgbaString(
+ web_ui()->GetWebContents()->GetColorProvider().GetColor(
+ kColorNewTabPageBackground)));
+}
+
+void OnboardingMessageHandler::HandleGetBackgroundColor(const base::Value::List& args) {
+ CHECK_EQ(1U, args.size());
+ const auto& callback_id = args[0].GetString();
+void OnboardingMessageHandler::HandleGetBackgroundColor(
+ const base::Value::List& args) {
+ CHECK_EQ(1U, args.size());
+ const auto& callback_id = args[0].GetString();
+
+ AllowJavascript();
+ ResolveJavascriptCallback(
+ base::Value(callback_id), GetNTPBackgroundColor());
+ AllowJavascript();
+ ResolveJavascriptCallback(base::Value(callback_id), GetNTPBackgroundColor());
+}
+
+void OnboardingMessageHandler::HandleGetPreferences(const base::Value::List& args) {
+ CHECK_EQ(1U, args.size());
+ const auto& callback_id = args[0].GetString();
+void OnboardingMessageHandler::HandleGetPreferences(
+ const base::Value::List& args) {
+ CHECK_EQ(1U, args.size());
+ const auto& callback_id = args[0].GetString();
+
+ AllowJavascript();
+ ResolveJavascriptCallback(
+ base::Value(callback_id), base::Value(GetPreferencesDict()));
+ AllowJavascript();
+ ResolveJavascriptCallback(base::Value(callback_id),
+ base::Value(GetPreferencesDict()));
+}
+
+void OnboardingMessageHandler::HandleGetProfileName(const base::Value::List& args) {
+ CHECK_EQ(1U, args.size());
+ const auto& callback_id = args[0].GetString();
+void OnboardingMessageHandler::HandleGetProfileName(
+ const base::Value::List& args) {
+ CHECK_EQ(1U, args.size());
+ const auto& callback_id = args[0].GetString();
+
+ ProfileAttributesEntry* entry =
+ g_browser_process->profile_manager()
+ ->GetProfileAttributesStorage()
+ .GetProfileAttributesWithPath(profile_->GetPath());
+ ProfileAttributesEntry* entry =
+ g_browser_process->profile_manager()
+ ->GetProfileAttributesStorage()
+ .GetProfileAttributesWithPath(profile_->GetPath());
+
+ if (!entry) {
+ return RejectJavascriptCallback(callback_id, "entry not found");
+ }
+ if (!entry) {
+ return RejectJavascriptCallback(callback_id, "entry not found");
+ }
+
+ AllowJavascript();
+ ResolveJavascriptCallback(
+ base::Value(callback_id),
+ base::Value(entry->GetLocalProfileName()));
+ AllowJavascript();
+ ResolveJavascriptCallback(base::Value(callback_id),
+ base::Value(entry->GetLocalProfileName()));
+}
+
+void OnboardingMessageHandler::HandleSetProfileName(const base::Value::List& args) {
+ CHECK_EQ(1U, args.size());
+ std::u16string new_name = base::UTF8ToUTF16(args[0].GetString());
+ base::TrimWhitespace(new_name, base::TRIM_ALL, &new_name);
+void OnboardingMessageHandler::HandleSetProfileName(
+ const base::Value::List& args) {
+ CHECK_EQ(1U, args.size());
+ std::u16string new_name = base::UTF8ToUTF16(args[0].GetString());
+ base::TrimWhitespace(new_name, base::TRIM_ALL, &new_name);
+
+ if (!new_name.empty()) {
+ profiles::UpdateProfileName(profile_, new_name);
+ }
+ if (!new_name.empty()) {
+ profiles::UpdateProfileName(profile_, new_name);
+ }
+}
+
+void OnboardingMessageHandler::HandleSetPreference(const base::Value::List& args) {
+ if (args.size() == 0) {
+ return;
+ }
+void OnboardingMessageHandler::HandleSetPreference(
+ const base::Value::List& args) {
+ if (args.size() == 0) {
+ return;
+ }
+
+ AllowJavascript();
+ AllowJavascript();
+
+ const auto& callback_id = args[0].GetString();
+ if (args.size() != 3) {
+ return RejectJavascriptCallback(callback_id, "invalid arguments");
+ }
+ const auto& callback_id = args[0].GetString();
+ if (args.size() != 3) {
+ return RejectJavascriptCallback(callback_id, "invalid arguments");
+ }
+
+ if (!args[1].is_string()) {
+ return RejectJavascriptCallback(callback_id, "pref is not a string");
+ }
+ if (!args[1].is_string()) {
+ return RejectJavascriptCallback(callback_id, "pref is not a string");
+ }
+
+ const auto& pref_name = prefs::kHeliumPrefPrefix + args[1].GetString();
+ auto* pref = pref_service_->FindPreference(pref_name);
+ if (!pref) {
+ return RejectJavascriptCallback(callback_id, pref_name + " does not exist");
+ }
+ const auto& pref_name = prefs::kHeliumPrefPrefix + args[1].GetString();
+ auto* pref = pref_service_->FindPreference(pref_name);
+ if (!pref) {
+ return RejectJavascriptCallback(callback_id, pref_name + " does not exist");
+ }
+
+ if (args[2].type() != pref->GetType()) {
+ return RejectJavascriptCallback(callback_id, "invalid value type");
+ }
+ if (args[2].type() != pref->GetType()) {
+ return RejectJavascriptCallback(callback_id, "invalid value type");
+ }
+
+ pref_service_->Set(pref_name, args[2].Clone());
+ pref_service_->Set(pref_name, args[2].Clone());
+
+ ResolveJavascriptCallback(callback_id, {});
+ ResolveJavascriptCallback(callback_id, {});
+}
+
+void OnboardingMessageHandler::HandleAcceptSchema(const base::Value::List&) {
+ helium::AcceptCurrentSchema(*pref_service_);
+}
--- /dev/null
+++ b/chrome/browser/ui/webui/onboarding/onboarding_handler.h
@@ -0,0 +1,51 @@
@@ -0,0 +1,52 @@
+// 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.
@@ -437,10 +435,10 @@
+#include "base/memory/weak_ptr.h"
+#include "base/values.h"
+#include "chrome/browser/profiles/profile.h"
+#include "components/prefs/pref_service.h"
+#include "components/prefs/pref_change_registrar.h"
+#include "content/public/browser/web_ui_message_handler.h"
+#include "chrome/browser/themes/theme_service_observer.h"
+#include "components/prefs/pref_change_registrar.h"
+#include "components/prefs/pref_service.h"
+#include "content/public/browser/web_ui_message_handler.h"
+
+class OnboardingMessageHandler : public content::WebUIMessageHandler,
+ public ThemeServiceObserver {
@@ -455,6 +453,7 @@
+ private:
+ base::Value::Dict GetPreferencesDict();
+ void HandleGetPreferences(const base::Value::List& args);
+ void HandleAcceptSchema(const base::Value::List& args);
+ void HandleSetPreference(const base::Value::List& args);
+ void HandleGetProfileName(const base::Value::List& args);
+ void HandleSetProfileName(const base::Value::List& args);
@@ -473,7 +472,7 @@
+ base::WeakPtrFactory<OnboardingMessageHandler> weak_ptr_factory_{this};
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_HANDLER_H_
+#endif // CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_HANDLER_H_
--- a/components/helium_services/helium_services_helpers.cc
+++ b/components/helium_services/helium_services_helpers.cc
@@ -53,12 +53,18 @@ GURL GetDummyURL() {
@@ -494,8 +493,8 @@
registrar.Add(prefs::kHeliumServicesEnabled, observer);
+ registrar.Add(prefs::kHeliumServicesConsented, observer);
registrar.Add(prefs::kHeliumServicesOrigin, observer);
registrar.Add(prefs::kHeliumSchemaVersion, observer);
registrar.Add(pref_name, observer);
}
--- a/chrome/browser/ui/incognito_allowed_url.cc
+++ b/chrome/browser/ui/incognito_allowed_url.cc
@@ -48,7 +48,8 @@ bool IsHostAllowedInIncognito(const GURL
@@ -533,9 +532,9 @@
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -1947,6 +1947,12 @@
<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
@@ -1956,6 +1956,12 @@
<message name="IDS_SETTINGS_HELIUM_SCHEMA_IGNORE" desc="Checkbox label to ignore any future services change alerts">
Don't notify me again
</message>
+ <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.
@@ -559,9 +558,9 @@
(*s_allowlist)[::prefs::kPrivacyGuideViewed] =
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
@@ -2,10 +2,42 @@
.label-wrapper {
padding: var(--cr-section-vertical-padding) 0;
@@ -25,10 +25,42 @@
margin-top: var(--cr-changelog-padding);
padding-top: calc(var(--cr-changelog-padding) / 2);
}
+
+ #onboarding-link {
@@ -599,10 +598,10 @@
+ </template>
+
+ <template is="dom-if" if="[[prefs.helium.services.user_consented.value]]">
<settings-toggle-button id="servicesToggleButton"
pref="{{prefs.helium.services.enabled}}"
label="$i18n{heliumServicesToggle}"
@@ -15,6 +47,7 @@
<template is="dom-if" if="[[changes_.length]]">
<div id="changelog-notice">
<div id="changelog-title">$i18n{heliumSchemaUpdatedTitle}</div>
@@ -57,6 +89,7 @@
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
</cr-collapse>
</div>
@@ -1,6 +1,6 @@
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -1181,7 +1181,7 @@ BASE_FEATURE(kHttpsFirstBalancedMode, ba
@@ -1185,7 +1185,7 @@ BASE_FEATURE(kHttpsFirstBalancedMode, ba
// Automatically enables HTTPS-First Mode in a balanced configuration when
// possible.
BASE_FEATURE(kHttpsFirstBalancedModeAutoEnable,
@@ -177,9 +177,9 @@
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/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::kHeliumExtProxyEnabled, true);
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
@@ -187,7 +187,7 @@
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
@@ -45,6 +45,11 @@
@@ -87,6 +87,11 @@
</settings-toggle-button>
<div class="cr-col">
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
@@ -201,10 +201,10 @@
</template>
--- a/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
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
{"heliumServicesToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
@@ -2130,6 +2130,10 @@ void AddPrivacyStrings(content::WebUIDat
IDS_SETTINGS_HELIUM_SCHEMA_NOTICE_DESCRIPTION},
{"heliumGotIt", IDS_SETTINGS_GOT_IT},
{"heliumSchemaIgnore", IDS_SETTINGS_HELIUM_SCHEMA_IGNORE},
+ {"heliumExtProxyToggle",
+ IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
+ {"heliumExtProxyToggleDescription",
@@ -214,7 +214,7 @@
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
--- a/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">
When enabled, Helium will be able to connect to anonymous web services to provide additional functionality. When disabled, additional features will not work.
</message>
@@ -229,7 +229,7 @@
</message>
--- a/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[] =
"helium.completed_onboarding";
@@ -241,7 +241,15 @@
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
--- a/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));
}
@@ -272,9 +280,9 @@
registrar.Add(prefs::kHeliumServicesEnabled, observer);
--- a/components/helium_services/helium_services_helpers.h
+++ b/components/helium_services/helium_services_helpers.h
@@ -18,8 +18,11 @@ const char kHeliumDefaultOrigin[] =
const char kHeliumDummyOrigin[] =
"https://helium-services-are-disabled.qjz9zk";
@@ -20,8 +20,11 @@ const char kHeliumDummyOrigin[] =
bool ShouldAccessServices(const PrefService& prefs);
+COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) GURL GetServicesBaseURL(const PrefService& prefs);
@@ -45,7 +45,7 @@
--- a/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);
}
@@ -57,7 +57,7 @@
bool ShouldFetchBangs(const PrefService& prefs) {
return ShouldAccessServices(prefs) &&
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));
}
@@ -74,7 +74,7 @@
registrar.Add(prefs::kHeliumServicesEnabled, observer);
--- a/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 GetExtensionUpdateURL(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) GURL GetWebstoreSnippetURL(const PrefService& prefs, std::string_view id);
@@ -84,7 +84,7 @@
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
--- a/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[] =
"helium.services.bangs";
@@ -118,7 +118,7 @@
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/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::kHeliumBangsEnabled, true);
registry->RegisterBooleanPref(prefs::kHeliumExtProxyEnabled, true);
@@ -128,7 +128,7 @@
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
@@ -55,6 +55,13 @@
@@ -97,6 +97,13 @@
label="$i18n{heliumBangsToggle}"
sub-label="$i18n{heliumBangsToggleDescription}">
</settings-toggle-button>
@@ -154,7 +154,7 @@
</if>
</if>
<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">
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>
@@ -178,16 +178,16 @@
#endif
#endif // !BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_CHROMEOS)
@@ -2128,6 +2128,9 @@ void AddPrivacyStrings(content::WebUIDat
@@ -2137,6 +2137,9 @@ void AddPrivacyStrings(content::WebUIDat
{"heliumBangsToggle", IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE},
{"heliumBangsToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION},
+ {"heliumSpellcheckToggle", IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE},
+ {"heliumSpellcheckToggleDescription",
+ IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE_DESCRIPTION},
{"heliumExtProxyToggle",
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
{"heliumExtProxyToggleDescription",
{"heliumOriginOverride", IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE},
{"heliumOriginOverrideDescription",
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
--- a/chrome/common/features.gni
+++ b/chrome/common/features.gni
@@ -10,6 +10,7 @@ import("//components/compose/features.gn
@@ -19,15 +19,6 @@
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (url_source_override_.is_valid()) {
return {GURL(url_source_override_)};
@@ -123,7 +125,7 @@ bool ConfiguratorImpl::EnabledDeltas() c
bool ConfiguratorImpl::EnabledComponentUpdates() const {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- return true;
+ return false;
}
bool ConfiguratorImpl::EnabledBackgroundDownloader() const {
@@ -133,7 +135,7 @@ bool ConfiguratorImpl::EnabledBackground
bool ConfiguratorImpl::EnabledCupSigning() const {
@@ -16,7 +16,7 @@
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
#include "components/saved_tab_groups/public/features.h"
@@ -2662,14 +2660,9 @@ void AddSearchStrings(content::WebUIData
@@ -2667,14 +2665,9 @@ void AddSearchStrings(content::WebUIData
html_source->AddString("searchExplanationLearnMoreURL",
chrome::kOmniboxLearnMoreURL);
+373 -17
View File
@@ -1,6 +1,6 @@
--- a/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">
Safe Browsing (protection from dangerous sites) and other security settings
</message>
@@ -10,6 +10,15 @@
+ <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
+ </message>
+ <message name="IDS_SETTINGS_HELIUM_SCHEMA_NOTICE_TITLE" desc="Title of the alert shown when Helium services have a change in behavior">
+ Updates to Helium services:
+ </message>
+ <message name="IDS_SETTINGS_HELIUM_SCHEMA_NOTICE_DESCRIPTION" desc="Description of the alert shown when Helium services have a change in behavior">
+ These changes are not active until you dismiss this notice.
+ </message>
+ <message name="IDS_SETTINGS_HELIUM_SCHEMA_IGNORE" desc="Checkbox label to ignore any future services change alerts">
+ Don't notify me again
+ </message>
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_TOGGLE" desc="Global toggle for enabling/disabling of all Helium services">
+ Allow connecting to Helium services
+ </message>
@@ -34,7 +43,7 @@
Google Advanced Protection Program
--- a/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,23 @@ void AddPrivacyStrings(content::WebUIDat
{"siteSettingsSublabel", IDS_SETTINGS_PERMISSIONS_DESCRIPTION},
{"securityPageTitle", IDS_SETTINGS_SECURITY},
{"securityPageDescription", IDS_SETTINGS_SECURITY_DESCRIPTION},
@@ -43,6 +52,11 @@
+ {"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
+ {"heliumServicesToggleDescription",
+ IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
+ {"heliumSchemaUpdatedTitle", IDS_SETTINGS_HELIUM_SCHEMA_NOTICE_TITLE},
+ {"heliumSchemaUpdatedDescription",
+ IDS_SETTINGS_HELIUM_SCHEMA_NOTICE_DESCRIPTION},
+ {"heliumGotIt", IDS_SETTINGS_GOT_IT},
+ {"heliumSchemaIgnore", IDS_SETTINGS_HELIUM_SCHEMA_IGNORE},
+ {"heliumOriginOverride", IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE},
+ {"heliumOriginOverrideDescription",
+ IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
@@ -151,17 +165,67 @@
"privacy_sandbox/privacy_sandbox_ad_measurement_subpage.ts",
"privacy_sandbox/privacy_sandbox_fledge_subpage.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
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
@@ -0,0 +1,47 @@
@@ -0,0 +1,89 @@
+<style include="cr-shared-style settings-shared">
+ .label-wrapper {
+ padding: var(--cr-section-vertical-padding) 0;
+ }
+
+ #changelog-notice {
+ --cr-changelog-padding: 16px;
+ border-radius: calc(var(--cr-changelog-padding) / 2);
+ margin: var(--cr-changelog-padding);
+ margin-top: 0;
+ padding: var(--cr-changelog-padding);
+ background: var(--md-background-color);
+ }
+
+ #changelog-title {
+ font-size: 15px;
+ font-weight: 500;
+ }
+
+ #changelog-notice-actions {
+ --cr-checkbox-label-padding-start: 8px;
+ display: flex;
+ gap: var(--cr-changelog-padding);
+ border-top: var(--cr-separator-line);
+ margin-top: var(--cr-changelog-padding);
+ padding-top: calc(var(--cr-changelog-padding) / 2);
+ }
+</style>
+
+<settings-subpage page-title="$i18n{heliumServicesTitle}" route-path$="[[routePath]]">
+<div class="cr-col first">
+ <template is="dom-if" if="[[changes_.length]]">
+ <div id="changelog-notice">
+ <div id="changelog-title">$i18n{heliumSchemaUpdatedTitle}</div>
+ <ul>
+ <template is="dom-repeat" items="[[changes_]]" as="change">
+ <li>[[change]]</li>
+ </template>
+ </ul>
+ <div id="changelog-description">
+ $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"
+ pref="{{prefs.helium.services.enabled}}"
+ label="$i18n{heliumServicesToggle}"
@@ -203,24 +267,29 @@
+</settings-subpage>
--- /dev/null
+++ b/chrome/browser/resources/settings/privacy_page/services_page.ts
@@ -0,0 +1,67 @@
@@ -0,0 +1,97 @@
+// 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.
+
+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 {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
+import {getTemplate} from './services_page.html.js';
+import {HelpBubbleMixin} from 'chrome://resources/cr_components/help_bubble/help_bubble_mixin.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 =
+ HelpBubbleMixin(I18nMixin(PrefsMixin(PolymerElement)));
+
+export class SettingsHeliumServicesPageElement
+ extends SettingsHeliumServicesPageElementBase
+{
+export class SettingsHeliumServicesPageElement extends
+ SettingsHeliumServicesPageElementBase {
+ private changeProxy_: HeliumServicesChangeHandler =
+ HeliumServicesChangeHandlerImpl.getInstance();
+
+ static get is() {
+ return 'settings-helium-services-page';
+ }
@@ -230,9 +299,15 @@
+ }
+
+ static get properties() {
+ return {};
+ return {
+ ignoreChecked_: Boolean,
+ changes_: Array,
+ };
+ }
+
+ declare private changes_: string[];
+ declare private ignoreChecked_: boolean;
+
+ private toOrigin(thing: string) {
+ try {
+ return new URL(thing).origin;
@@ -241,6 +316,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) {
+ const target = event.target as CrInputElement;
+
@@ -299,11 +393,13 @@
#include "components/policy/core/common/policy_pref_names.h"
#include "components/pref_registry/pref_registry_syncable.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);
#endif
+ {
+ registry->RegisterIntegerPref(prefs::kHeliumSchemaVersion, 0);
+ registry->RegisterBooleanPref(prefs::kHeliumDisableSchemaAlerts, false);
+ registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
+ registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
+ }
@@ -336,7 +432,7 @@
settings_api::PrefType::kBoolean;
--- /dev/null
+++ b/components/helium_services/BUILD.gn
@@ -0,0 +1,20 @@
@@ -0,0 +1,22 @@
+# 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.
@@ -346,6 +442,8 @@
+ "helium_services_helpers.cc",
+ "helium_services_helpers.h",
+ "pref_names.h",
+ "schema.cc",
+ "schema.h",
+ ]
+
+ public_deps = [
@@ -359,7 +457,7 @@
+}
--- /dev/null
+++ b/components/helium_services/helium_services_helpers.cc
@@ -0,0 +1,66 @@
@@ -0,0 +1,67 @@
+// 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.
@@ -422,13 +520,14 @@
+ PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer) {
+ registrar.Add(prefs::kHeliumServicesEnabled, observer);
+ registrar.Add(prefs::kHeliumServicesOrigin, observer);
+ registrar.Add(prefs::kHeliumSchemaVersion, observer);
+ registrar.Add(pref_name, observer);
+}
+
+} // namespace helium
--- /dev/null
+++ b/components/helium_services/helium_services_helpers.h
@@ -0,0 +1,28 @@
@@ -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.
@@ -449,6 +548,8 @@
+const char kHeliumDummyOrigin[] =
+ "https://helium-services-are-disabled.qjz9zk";
+
+bool ShouldAccessServices(const PrefService& prefs);
+
+COMPONENT_EXPORT(HELIUM) GURL GetServicesBaseURL(const PrefService& prefs);
+COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
+COMPONENT_EXPORT(HELIUM) std::optional<GURL> GetValidUserOverridenURL(std::string_view user_url_);
@@ -459,7 +560,7 @@
+#endif // COMPONENTS_HELIUM_SERVICES_HELIUM_SERVICES_HELPERS_H_
--- /dev/null
+++ b/components/helium_services/pref_names.h
@@ -0,0 +1,18 @@
@@ -0,0 +1,24 @@
+// 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.
@@ -469,6 +570,12 @@
+
+namespace prefs {
+
+inline constexpr char kHeliumSchemaVersion[] =
+ "helium.services.schema_version";
+
+inline constexpr char kHeliumDisableSchemaAlerts[] =
+ "helium.services.disable_schema_alerts";
+
+inline constexpr char kHeliumServicesEnabled[] =
+ "helium.services.enabled";
+
@@ -478,3 +585,252 @@
+} // namespace prefs
+
+#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,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.
+
+#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,
+ "Automatic component updates are now available. They're managed by the same toggle that enables automatic browser updates.\n"
+ "From now on, you'll be notified about major changes to Helium services. Even though these notifications are extremely rare, you can choose to ignore them and accept all future changes automatically."
+ }
+ });
+
+ 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));
@@ -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 review the changes.
+ </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 updates
+ </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 updated
+ </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);
--- a/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 ShouldAccessExtensionService(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) bool ShouldAccessUpdateService(const PrefService& prefs);
@@ -46,7 +46,7 @@
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
--- a/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[] =
"helium.services.spellcheck_files";
@@ -68,7 +68,7 @@
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/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::kHeliumServicesConsented, false);
registry->RegisterBooleanPref(prefs::kHeliumUpdateFetchingEnabled, true);
@@ -217,10 +217,10 @@
if ( bin.assetSourceRegistry instanceof Object ) {
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -2002,6 +2002,12 @@
<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.
</message>
@@ -2018,6 +2018,12 @@
Helium will automatically download and install browser and component updates as they become available. We recommend keeping this setting enabled to ensure you get the latest features and security updates. Automatic core browser updates are not available on this platform yet, but component updates are. Please use external software to keep Helium up to date.
</message>
</if>
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_UBO" desc="Description of the toggle for uBO filter lists">
+ Allow downloading filter lists for uBlock Origin
+ </message>
@@ -232,10 +232,10 @@
</message>
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
@@ -69,6 +69,11 @@
sub-label="$i18n{heliumUpdatesToggleDescription}">
</settings-toggle-button>
</if>
@@ -109,6 +109,11 @@
label="$i18n{heliumUpdatesToggle}"
sub-label="$i18n{heliumUpdatesToggleDescription}">
</settings-toggle-button>
+ <settings-toggle-button id="filterlistToggleButton"
+ pref="{{prefs.helium.services.ublock_assets}}"
+ label="$i18n{heliumUboToggle}"
@@ -246,7 +246,7 @@
</template>
--- a/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
@@ -2144,6 +2144,10 @@ void AddPrivacyStrings(content::WebUIDat
IDS_SETTINGS_HELIUM_SERVICES_UPDATE},
{"heliumUpdatesToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION},
@@ -21,7 +21,7 @@
location <= mojom::ManifestLocation::kMaxValue;
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -6194,7 +6194,8 @@ void AddChromeSchemeFactories(
@@ -6212,7 +6212,8 @@ void AddChromeSchemeFactories(
std::vector<std::string> allowed_webui_hosts;
// Support for chrome:// scheme if appropriate.
if ((extension->is_extension() || extension->is_platform_app()) &&
@@ -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">
Learn more about Do Not Track
</message>
@@ -3207,6 +3210,9 @@
@@ -3223,6 +3226,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.">
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>
@@ -31,7 +31,7 @@
{"doNotTrackDialogLearnMoreA11yLabel",
IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_LEARN_MORE_ACCESSIBILITY_LABEL},
// TODO(crbug.com/40122957): This string is no longer used. Remove.
@@ -2829,7 +2829,7 @@ void AddSiteSettingsStrings(content::Web
@@ -2834,7 +2834,7 @@ void AddSiteSettingsStrings(content::Web
{"trackingProtectionSitesAllowedCookiesTitle",
IDS_SETTINGS_TRACKING_PROTECTION_SITES_ALLOWED_COOKIES_TITLE},
{"trackingProtectionSitesAllowedCookiesDescription",
+4 -4
View File
@@ -52,10 +52,10 @@
-#else
text = l10n_util::GetStringUTF16(IDS_APP_MENU_BUTTON_UPDATE);
-#endif
} else {
tooltip_message_id = IDS_APPMENU_TOOLTIP_ALERT;
const int text_id =
@@ -228,37 +199,19 @@ void BrowserAppMenuButton::UpdateTextAnd
} else if (type_and_severity_.type ==
AppMenuIconController::IconType::kHeliumServicesUpdate) {
tooltip_message_id = IDS_APPMENU_TOOLTIP_HELIUM_SERVICES_UPDATE;
@@ -233,37 +204,19 @@ void BrowserAppMenuButton::UpdateTextAnd
}
bool BrowserAppMenuButton::ShouldPaintBorder() const {
+14 -14
View File
@@ -1,6 +1,6 @@
--- a/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())) {
AddItemWithStringIdAndVectorIcon(
this, IDC_COPY_URL, IDS_APP_MENU_COPY_LINK, kLinkChromeRefreshIcon);
@@ -10,7 +10,7 @@
AddItemWithStringIdAndVectorIcon(this, IDC_QRCODE_GENERATOR,
IDS_APP_MENU_CREATE_QR_CODE,
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,
kNameWindowIcon);
@@ -25,7 +25,7 @@
if (base::FeatureList::IsEnabled(contextual_tasks::kContextualTasks)) {
AddItemWithStringIdAndVectorIcon(
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);
@@ -41,7 +41,7 @@
AddItemWithStringIdAndVectorIcon(this, IDC_PERFORMANCE, IDS_SHOW_PERFORMANCE,
kPerformanceIcon);
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.
DCHECK_EQ(0u, GetItemCount());
@@ -66,7 +66,7 @@
AddSeparator(ui::NORMAL_SEPARATOR);
}
@@ -1812,43 +1778,6 @@ void AppMenuModel::Build() {
@@ -1813,43 +1779,6 @@ void AppMenuModel::Build() {
AddSeparator(ui::NORMAL_SEPARATOR);
@@ -110,7 +110,7 @@
if (!browser_->profile()->IsOffTheRecord()) {
auto recent_tabs_sub_menu =
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_);
AddSubMenuWithStringIdAndVectorIcon(
@@ -119,7 +119,7 @@
bookmark_sub_menu_model_.get(), kBookmarksListsMenuIcon);
SetElementIdentifierAt(GetIndexOfCommandId(IDC_BOOKMARKS_MENU).value(),
kBookmarksMenuItem);
@@ -1887,23 +1816,10 @@ void AppMenuModel::Build() {
@@ -1888,23 +1817,10 @@ void AppMenuModel::Build() {
kTabGroupsMenuItem);
}
@@ -147,7 +147,7 @@
AddItemWithStringIdAndVectorIcon(this, IDC_CLEAR_BROWSING_DATA,
IDS_CLEAR_BROWSING_DATA,
@@ -1950,9 +1866,6 @@ void AppMenuModel::Build() {
@@ -1951,9 +1867,6 @@ void AppMenuModel::Build() {
lens::features::kLensOverlay));
}
@@ -157,7 +157,7 @@
CreateFindAndEditSubMenu();
sub_menus_.push_back(
@@ -2001,6 +1914,12 @@ void AppMenuModel::Build() {
@@ -2002,6 +1915,12 @@ void AppMenuModel::Build() {
#endif
#endif
@@ -170,7 +170,7 @@
AddItemWithStringIdAndVectorIcon(this, IDC_OPTIONS, IDS_SETTINGS,
kSettingsMenuIcon);
@@ -2096,34 +2015,21 @@ bool AppMenuModel::AddDefaultBrowserMenu
@@ -2098,34 +2017,21 @@ bool AppMenuModel::AddDefaultBrowserMenu
return false;
}
@@ -217,12 +217,12 @@
+ return false;
}
#if BUILDFLAG(IS_CHROMEOS)
bool AppMenuModel::AddHeliumSchemaItem() {
--- 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();
@@ -284,6 +284,9 @@ class AppMenuModel : public ui::SimpleMe
// Adds a nag to review Helium services permission changes
bool AddHeliumSchemaItem();
+ // Adds a nag to relaunch the browser after an update
+ bool AddUpgradeMenuItem();
+1 -1
View File
@@ -58,7 +58,7 @@
#include "components/search_engines/template_url_service.h"
#include "components/search_engines/template_url_starter_pack_data.h"
#include "components/strings/grit/components_strings.h"
@@ -1944,7 +1945,21 @@ void AutocompleteController::UpdateKeywo
@@ -1939,7 +1940,21 @@ void AutocompleteController::UpdateKeywo
// - For contextual search matches, the description indicates the
// alternative UX because they're opened in the side panel.
i->description = template_url->AdjustedShortNameForLocaleDirection();
+3 -3
View File
@@ -102,8 +102,8 @@
${this.lazyRender_ ? html`
${this.shortcutsEnabled_ ? html`
<cr-most-visited id="mostVisited" .theme="${this.theme_?.mostVisited || null}"
@@ -93,54 +6,7 @@ import {nothing} from '//resources/lit/v
?expandable-tiles-enabled="${this.ntpNextFeaturesEnabled_}">
@@ -94,54 +7,7 @@ import {nothing} from '//resources/lit/v
max-tiles-before-show-more="${this.maxTilesBeforeShowMore_}">
</cr-most-visited>
` : ''}
- ${this.middleSlotPromoEnabled_ ? html`
@@ -157,7 +157,7 @@
<ntp-customize-buttons id="customizeButtons"
?modules-shown-to-user="${this.modulesShownToUser}"
?show-background-image="${this.showBackgroundImage_}"
@@ -162,23 +28,3 @@ import {nothing} from '//resources/lit/v
@@ -163,23 +29,3 @@ import {nothing} from '//resources/lit/v
` : ''}
<div id="contentBottomSpacer"></div>
</div>
@@ -107,7 +107,7 @@
// Reparent PWA views that were moved for immersive mode.
if (web_app_frame_toolbar_) {
@@ -5196,6 +5202,12 @@ void BrowserView::AddedToWidget() {
@@ -5197,6 +5203,12 @@ void BrowserView::AddedToWidget() {
toolbar_->Init();
@@ -122,20 +122,21 @@
// TODO(pbos): Investigate whether the side panels should be creatable when
--- a/chrome/browser/ui/views/frame/layout/browser_view_layout_impl_old.cc
+++ b/chrome/browser/ui/views/frame/layout/browser_view_layout_impl_old.cc
@@ -406,6 +406,12 @@ void BrowserViewLayoutImplOld::LayoutVer
void BrowserViewLayoutImplOld::LayoutTabStripRegion(
gfx::Rect& available_bounds) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutTabStripRegion");
@@ -411,6 +411,13 @@ void BrowserViewLayoutImplOld::LayoutTab
views().tab_strip_region_view->SetBounds(0, 0, 0, 0);
return;
}
+
+ // If the CAT feature is enabled, then the tab strip is in the toolbar.
+ // We shouldn't layout it here.
+ if (features::IsHeliumCatEnabled()) {
+ return;
+ }
if (!delegate().ShouldDrawTabStrip()) {
SetViewVisibility(views().tab_strip_region_view, false);
views().tab_strip_region_view->SetBounds(0, 0, 0, 0);
@@ -458,6 +464,15 @@ void BrowserViewLayoutImplOld::LayoutToo
+
// This retrieves the bounds for the tab strip based on whether or not we show
// anything to the left of it, like the incognito avatar.
gfx::Rect tab_strip_region_bounds(
@@ -458,6 +465,15 @@ void BrowserViewLayoutImplOld::LayoutToo
toolbar_bounds.set_x(available_bounds.x());
toolbar_bounds.set_width(toolbar_bounds.width() - kVerticalTabStripWidth);
views().toolbar->SetBoundsRect(toolbar_bounds);
@@ -197,7 +198,7 @@
show_avatar_button_.Init(
prefs::kShowAvatarButton, prefs,
base::BindRepeating(&ToolbarView::OnShowAvatarButtonChanged,
@@ -573,12 +596,27 @@ void ToolbarView::Init() {
@@ -573,12 +596,30 @@ void ToolbarView::Init() {
InitLayout();
@@ -218,14 +219,17 @@
+ if (features::IsHeliumCatEnabled()) {
+ pinned_toolbar_actions_container_->SetProperty(
+ views::kFlexBehaviorKey, flex_preferred);
+ extensions_container_->SetProperty(
+ views::kFlexBehaviorKey, flex_preferred);
+
+ if (extensions_container_) {
+ extensions_container_->SetProperty(
+ views::kFlexBehaviorKey, flex_preferred);
+ }
+ }
+
if (browser_view_->GetSupportsTabStrip()) {
browser()->GetTabStripModel()->AddObserver(this);
}
@@ -703,6 +741,24 @@ bool ToolbarView::IsRectInWindowCaption(
@@ -703,6 +744,24 @@ bool ToolbarView::IsRectInWindowCaption(
return gfx::ToEnclosingRect(rect_in_target_coords_f);
};
@@ -250,7 +254,7 @@
// Check each child view in container_view_ to see if the rect intersects with
// any clickable elements. If it does, check if the click is actually on that
// element. False if on a clickable element, true if not on a clickable element.
@@ -982,8 +1038,12 @@ void ToolbarView::InitLayout() {
@@ -982,8 +1041,12 @@ void ToolbarView::InitLayout() {
constexpr int kToolbarActionsFlexOrder = kOrderOffset + 2;
constexpr int kExtensionsFlexOrder = kOrderOffset + 3;
@@ -264,7 +268,7 @@
views::MaximumFlexSizeRule::kUnbounded)
.WithOrder(kLocationBarFlexOrder);
@@ -999,6 +1059,12 @@ void ToolbarView::InitLayout() {
@@ -999,6 +1062,12 @@ void ToolbarView::InitLayout() {
location_bar_->SetProperty(views::kMarginsKey,
gfx::Insets::VH(0, location_bar_margin));
+5 -5
View File
@@ -1,6 +1,6 @@
--- a/ui/webui/resources/cr_components/most_visited/most_visited.ts
+++ b/ui/webui/resources/cr_components/most_visited/most_visited.ts
@@ -719,7 +719,7 @@ export class MostVisitedElement extends
@@ -717,7 +717,7 @@ export class MostVisitedElement extends
protected getFaviconUrl_(url: Url): string {
const faviconUrl = new URL('chrome://favicon2/');
@@ -38,7 +38,7 @@
display: inline-block;
height: 100%;
outline: none;
@@ -184,7 +184,7 @@
@@ -187,7 +187,7 @@
.tile-icon {
align-items: center;
background-color: var(--tile-background-color);
@@ -47,7 +47,7 @@
display: flex;
flex-shrink: 0;
height: var(--icon-size);
@@ -194,8 +194,8 @@
@@ -197,8 +197,8 @@
}
.tile-icon img {
@@ -58,7 +58,7 @@
}
.managed-tile-icon {
@@ -218,7 +218,6 @@ cr-policy-indicator {
@@ -221,7 +221,6 @@ cr-policy-indicator {
.tile-title {
align-items: center;
@@ -66,7 +66,7 @@
color: var(--most-visited-text-color);
display: flex;
height: var(--title-height);
@@ -263,7 +262,7 @@ cr-icon-button {
@@ -266,7 +265,7 @@ cr-icon-button {
--cr-icon-button-fill-color: var(--icon-button-color);
--cr-icon-button-size: 28px;
--cr-icon-button-transition: none;
+1 -1
View File
@@ -517,7 +517,7 @@
// The container (and extensions-menu button) should not be visible if we have
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -10466,6 +10466,9 @@ Keep your key file in a safe place. You
@@ -10469,6 +10469,9 @@ Keep your key file in a safe place. You
<message name="IDS_ACCNAME_FIND" desc="The accessible name for the find button.">
Find
</message>
@@ -87,7 +87,7 @@
};
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -13438,6 +13438,9 @@ Check your passwords anytime in <ph name
@@ -13444,6 +13444,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">
Installed because of dependent extension(s).
</message>
+2 -1
View File
@@ -2,7 +2,6 @@ upstream-fixes/missing-dependencies.patch
upstream-fixes/fix-crash-without-enterprise-cloud-content-analysis.patch
upstream-fixes/fix-python-codecs-deprecation.patch
upstream-fixes/fix-macos-widget-rect.patch
upstream-fixes/fix-macos-fullscreen-ui-breakage.patch
inox-patchset/fix-building-without-safebrowsing.patch
inox-patchset/disable-autofill-download-manager.patch
@@ -118,6 +117,7 @@ helium/core/add-zen-importer.patch
helium/core/disable-unsupported-importers.patch
helium/core/fix-building-without-safebrowsing.patch
helium/core/services-prefs.patch
helium/core/services-schema-nag.patch
helium/core/override-chrome-protocol.patch
helium/core/onboarding-page.patch
helium/core/change-chromium-branding.patch
@@ -190,6 +190,7 @@ helium/core/webrtc-default-handling-policy.patch
helium/core/browser-window-context-menu.patch
helium/core/disable-ntp-footer.patch
helium/core/tab-cycling-mru.patch
helium/core/component-updates.patch
helium/settings/settings-page-icons.patch
helium/settings/move-search-suggest.patch
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -5203,10 +5203,12 @@ const FeatureEntry::FeatureVariation kPr
@@ -5210,10 +5210,12 @@ const FeatureEntry::FeatureVariation kPr
#include "chrome/browser/ungoogled_flag_choices.h"
#include "chrome/browser/bromite_flag_choices.h"
#include "chrome/browser/ungoogled_platform_flag_choices.h"
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -5199,7 +5199,13 @@ const FeatureEntry::FeatureVariation kPr
@@ -5206,7 +5206,13 @@ const FeatureEntry::FeatureVariation kPr
// calculate and verify checksum.
//
// When adding a new choice, add it to the end of the list.
@@ -1,69 +1,49 @@
# Disable some background communication with clients2.google.com
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2683,24 +2683,6 @@ void ChromeContentBrowserClient::AppendE
command_line->AppendSwitchASCII(switches::kMetricsClientID,
client_info->client_id);
}
-#elif BUILDFLAG(IS_POSIX)
-#if !BUILDFLAG(IS_ANDROID)
- pid_t pid;
- if (crash_reporter::GetHandlerSocket(nullptr, &pid)) {
- command_line->AppendSwitchASCII(
- crash_reporter::switches::kCrashpadHandlerPid,
- base::NumberToString(pid));
- }
-#endif
- std::string switch_value;
- std::unique_ptr<metrics::ClientInfo> client_info =
- GoogleUpdateSettings::LoadMetricsClientInfo();
- if (client_info) {
- switch_value = client_info->client_id;
- }
- switch_value.push_back(',');
- switch_value.append(chrome::GetChannelName(chrome::WithExtendedStable(true)));
- command_line->AppendSwitchASCII(switches::kEnableCrashReporter, switch_value);
--- a/components/crash/core/app/crash_reporter_client.cc
+++ b/components/crash/core/app/crash_reporter_client.cc
@@ -146,7 +146,7 @@ void CrashReporterClient::GetSanitizatio
#endif
if (logging::DialogsAreSuppressed()) {
std::string CrashReporterClient::GetUploadUrl() {
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OFFICIAL_BUILD)
+#if 0
return kDefaultUploadURL;
#else
return std::string();
--- a/components/crash/core/app/crashpad.cc
+++ b/components/crash/core/app/crashpad.cc
@@ -72,6 +72,12 @@ void InitializeDatabasePath(const base::
}
bool InitializeCrashpadImpl(bool initial_client,
+ const std::string& a, const std::string& b, const base::FilePath& c,
+ const std::vector<std::string>& d, bool e, const std::vector<base::FilePath>& f) {
@@ -78,6 +78,13 @@ bool InitializeCrashpadImpl(bool initial
const std::vector<std::string>& initial_arguments,
bool embedded_handler,
const std::vector<base::FilePath>& attachments) {
+// Crashpad is needed on Linux because it's used as a WASM signal handler.
+// This is not the case on other platforms, and so it can remain entirely
+// disabled there.
+#if !BUILDFLAG(IS_LINUX)
+ return false;
+}
+[[maybe_unused]]
+bool DeadInitializeCrashpadImpl(bool initial_client,
const std::string& process_type,
const std::string& user_data_dir,
const base::FilePath& exe_path,
--- a/components/gwp_asan/client/gwp_asan.cc
+++ b/components/gwp_asan/client/gwp_asan.cc
@@ -344,6 +344,11 @@ GWP_ASAN_EXPORT std::optional<AllocatorS
+#endif
+
static bool initialized = false;
DCHECK(!initialized);
initialized = true;
--- a/third_party/crashpad/crashpad/handler/handler_main.cc
+++ b/third_party/crashpad/crashpad/handler/handler_main.cc
@@ -875,7 +875,7 @@ int HandlerMain(int argc,
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
// BUILDFLAG(IS_ANDROID)
case kOptionURL: {
- options.url = optarg;
+ options.url = "";
break;
}
#if BUILDFLAG(IS_CHROMEOS)
@@ -1016,7 +1016,7 @@ int HandlerMain(int argc,
}
// Exported for testing.
GWP_ASAN_EXPORT std::optional<AllocatorSettings> GetAllocatorSettings(
+ const base::Feature& a, bool b, std::string_view c) {
+ return std::nullopt;
+}
+[[maybe_unused]]
+std::optional<AllocatorSettings> DeadGetAllocatorSettings(
const base::Feature& feature,
bool boost_sampling,
std::string_view process_type) {
--- a/third_party/crashpad/crashpad/client/crashpad_client_linux.cc
+++ b/third_party/crashpad/crashpad/client/crashpad_client_linux.cc
@@ -747,8 +747,6 @@ void CrashpadClient::CrashWithoutDump(co
// static
void CrashpadClient::SetFirstChanceExceptionHandler(
FirstChanceHandler handler) {
- DCHECK(SignalHandler::Get());
- SignalHandler::Get()->SetFirstChanceHandler(handler);
}
// static
ScopedStoppable upload_thread;
- if (!options.url.empty()) {
+ if ((false)) {
// TODO(scottmg): options.rate_limit should be removed when we have a
// configurable database setting to control upload limiting.
// See https://crashpad.chromium.org/bug/23.
@@ -1603,6 +1603,29 @@
#endif
}
--- a/chrome/browser/ui/safety_hub/abusive_notification_permissions_manager.cc
+++ b/chrome/browser/ui/safety_hub/abusive_notification_permissions_manager.cc
@@ -108,20 +108,7 @@ safe_browsing::NotificationRevocationSou
// suspicious notification.
bool HasShowOriginalSuspiciousNotification(HostContentSettingsMap* hcsm,
GURL url) {
- DCHECK(hcsm);
- DCHECK(url.is_valid());
- base::Value stored_value(hcsm->GetWebsiteSetting(
- url, url, ContentSettingsType::SUSPICIOUS_NOTIFICATION_SHOW_ORIGINAL));
-
- if (stored_value.is_none()) {
return false;
- }
- DCHECK(stored_value.is_dict());
- DCHECK(stored_value.GetDict().contains(
- safe_browsing::kSuspiciousNotificationShowOriginalKey));
- return stored_value.GetDict()
- .FindBool(safe_browsing::kSuspiciousNotificationShowOriginalKey)
- .value_or(false);
}
// Return true if the url should be considered for suspicious content
--- a/chrome/browser/ui/safety_hub/revoked_permissions_service.cc
+++ b/chrome/browser/ui/safety_hub/revoked_permissions_service.cc
@@ -41,7 +41,6 @@
@@ -1,130 +0,0 @@
From 1e69bde8508191f45357b8c027bcd63a58d9ea8d Mon Sep 17 00:00:00 2001
From: Dana Fried <dfried@chromium.org>
Date: Fri, 31 Oct 2025 11:49:22 -0700
Subject: [PATCH] [Browser Frame] Abandon reading Mac caption button positions
These were not reliable during fullscreen transitions in a way that was
not possible to accurately filter out. This now uses the old fallback
hard-coded constants that were being used in all PWA windows anyway.
Include-Ci-Only-Tests: chromium.mac:mac15-x64-rel-tests|browser_tests
Bug: 453717426
Change-Id: Id102a321834c3dac0f56edcacda933c88db0b82a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7107360
Reviewed-by: Darryl James <dljames@chromium.org>
Commit-Queue: Dana Fried <dfried@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1538756}
---
--- a/chrome/browser/ui/views/frame/browser_frame_view_mac.h
+++ b/chrome/browser/ui/views/frame/browser_frame_view_mac.h
@@ -90,9 +90,6 @@ class BrowserFrameViewMac : public Brows
FRIEND_TEST_ALL_PREFIXES(BrowserFrameViewMacTest,
GetCaptionButtonPlaceholderBounds);
- // Fetches the caption button bounds from the buttons themselves.
- BoundsAndMargins GetCaptionButtonBoundsNative() const;
-
// Creates an inset from the caption button size which controls for which edge
// the captions buttons exists on. Used to position elements like the tabstrip
// that are adjacent to the caption buttons.
--- a/chrome/browser/ui/views/frame/browser_frame_view_mac.mm
+++ b/chrome/browser/ui/views/frame/browser_frame_view_mac.mm
@@ -458,96 +458,9 @@ void BrowserFrameViewMac::PaintChildren(
}
BrowserFrameViewMac::BoundsAndMargins
-BrowserFrameViewMac::GetCaptionButtonBoundsNative() const {
- BoundsAndMargins result;
-
- // Verify that this is not an out-of-process window.
- const auto native_window = GetWidget()->GetNativeWindow();
- if (auto* const host =
- views::NativeWidgetMacNSWindowHost::GetFromNativeWindow(
- native_window);
- host && host->application_host()) {
- return result;
- }
-
- // Verify that there is a valid NSWindow.
- NSWindow* ns_window = native_window.GetNativeNSWindow();
- if (!ns_window) {
- return result;
- }
-
- // Build a list of caption button bounds.
- std::vector<gfx::RectF> button_rects;
-
- // Also track some other data that will be useful for calculating the visual
- // margins of the buttons against the window border.
- float min_x = width();
- float max_x = 0;
- float min_y = height();
-
- // Chrome coordinates are reversed in RTL but not in the Mac API, so we might
- // have to flip them.
- const bool is_rtl = base::i18n::IsRTL();
-
- // Build the list. If any of the buttons are not present or are zero size,
- // abort (this will fall back to previous hard-coded values).
- for (NSButton* button :
- {[ns_window standardWindowButton:NSWindowCloseButton],
- [ns_window standardWindowButton:NSWindowMiniaturizeButton],
- [ns_window standardWindowButton:NSWindowZoomButton]}) {
- if (!button) {
- return result;
- }
- NSRect ns_rect = [button convertRect:[button bounds] toView:nil];
-
- // When converting from Mac to Chrome coordinates:
- // - Y axis is inverted (Mac coordinates start at bottom-left).
- // - X axis is inverted in RTL mode only (Mac coordinates are invariant
- // while Chrome reverses them).
- button_rects.emplace_back(
- is_rtl ? width() - (ns_rect.origin.x + ns_rect.size.width)
- : ns_rect.origin.x,
- height() - (ns_rect.origin.y + ns_rect.size.height), ns_rect.size.width,
- ns_rect.size.height);
- const auto& rect = button_rects.back();
- if (rect.IsEmpty()) {
- return result;
- }
- min_x = std::min(min_x, rect.x());
- max_x = std::max(max_x, rect.right());
- min_y = std::min(min_y, rect.y());
- }
-
- // Calculate the margins that the buttons are using.
- const float block_margin = min_y;
- const float inline_margin =
- CaptionButtonsOnLeadingEdge() ? min_x : width() - max_x;
-
- // Accumulate the button bounds.
- for (const auto& rect : button_rects) {
- result.bounds.Union(rect);
- }
-
- // Apply the margins on the exterior of the region, so that the padding around
- // the buttons appears visually symmetrical.
- result.margins = gfx::OutsetsF::VH(block_margin, inline_margin);
-
- return result;
-}
-
-BrowserFrameViewMac::BoundsAndMargins
BrowserFrameViewMac::GetCaptionButtonBounds() const {
- BoundsAndMargins result = GetCaptionButtonBoundsNative();
- if (!result.bounds.IsEmpty()) {
- return result;
- }
+ BoundsAndMargins result;
- // If that doesn't work, fall back to some hard-coded constants. These will
- // apply for app windows, since the app is out of process and the caption
- // buttons can't be retrieved. Note that the app window actually positions its
- // buttons slightly differently from a standard browser window (it's unclear
- // why).
- //
// These are empirically determined; feel free to change them if they're
// not precise.
if (@available(macOS 26, *)) {
@@ -48,6 +48,16 @@
]
# Disallow depending on content.
--- a/components/contextual_tasks/internal/BUILD.gn
+++ b/components/contextual_tasks/internal/BUILD.gn
@@ -43,6 +43,7 @@ source_set("internal") {
"//components/sync/model",
"//components/url_formatter",
"//net",
+ "//third_party/re2",
"//ui/gfx",
"//url",
]
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -119,6 +119,7 @@ source_set("browser") {
+1 -1
View File
@@ -1 +1 @@
2
4