Compare commits

..

23 Commits

Author SHA1 Message Date
wukko 4991dcc364 revision: bump to 4 (#415) 2025-11-07 20:31:51 +00:00
wukko 7222174274 helium/toolbar: options for hiding back, reload, and menu buttons (#414)
also:
- refactored related patches
- reordered & sorted toolbar options in the customization side panel
- added "customize helium" option to browser window's context menu
2025-11-08 02:27:05 +06:00
wukko 2315522ef2 helium/core: add "customize helium" option to window's context menu 2025-11-08 02:22:54 +06:00
wukko dc61f5cf4f helium/toolbar: add prefs for hiding back, reload, and main menu buttons 2025-11-08 02:22:47 +06:00
wukko 8486eb8436 helium: merge toolbar prefs, move to ui 2025-11-07 19:06:33 +06:00
jj 537ba368e9 helium/core: return "Google Chrome" as browser brand (#408) 2025-11-07 12:10:20 +00:00
jj 61c7f706eb helium/devtools: fix building with sync ripped out (#409) 2025-11-07 12:55:41 +01:00
jj ee6294e217 patches/upstream-fixes: fix warning when building with py3.14 (#410) 2025-11-07 10:16:07 +01:00
wukko e3bcfa4148 merge: update to chromium 142.0.7444.134 (#402) 2025-11-07 01:06:43 +06:00
wukko 4700d1bc7e patches: refresh and update for 142.0.7444.134
`force-eu-search-features.patch` had notable changes for [7102578](https://chromium-review.googlesource.com/c/chromium/src/+/7102578)
2025-11-07 00:11:50 +06:00
wukko 617bd4b75e merge: update to ungoogled-chromium 142.0.7444.134 2025-11-07 00:11:46 +06:00
wukko 7b31f0b137 extras: update onboarding to 202511061712 (#407) 2025-11-06 17:52:26 +00:00
jj 7815dd5522 helium/devtools: remove "account" section from settings (#405)
Fixes #400
2025-11-06 17:10:15 +00:00
jj 48577b920b helium/core: fix ublock origin being re-enabled when updated (#404) 2025-11-06 17:10:39 +01:00
Blaise a264ac047d Update to Chromium 142.0.7444.134 2025-11-06 06:07:35 -06:00
wukko eaf2714853 helium/ui: add window frame hit test to toolbar (#395)
allows for the toolbar to be the handle for window dragging.
prerequisite for vertical tabs and other UI experiments 👀
2025-11-04 18:12:30 +06:00
wukko cc1db76e65 ungoogled/existing-switches: fix order of webrtc policy pref (#390) 2025-11-04 13:39:10 +06:00
jj ae476a674c patches/upstream-fixes: add fix for connectors_service_ CHECK 2025-11-03 15:44:30 +00:00
Andreas Stieger 74779ebab4 add openSUSE instructions (#3527) 2025-11-02 12:57:24 -06:00
Mrugesh Mohapatra 70627f67f4 github: add well-known funding file for ownership verification (#364) 2025-11-02 17:28:46 +06:00
jj c50904a16e revision: bump to 3 2025-11-01 18:17:51 +00:00
jj 2300b0f239 patches/upstream-fixes: add fix for connectors_service_ CHECK 2025-11-01 18:17:21 +00:00
wukko 19d1c7fa61 helium/core/exclude-flags: remove irrelevant flags added in M142 (#372) 2025-10-31 21:23:50 +00:00
33 changed files with 1027 additions and 524 deletions
@@ -0,0 +1 @@
https://helium.computer/funding.json
+1 -1
View File
@@ -1 +1 @@
142.0.7444.59
142.0.7444.134
+2
View File
@@ -5688,8 +5688,10 @@ third_party/blink/renderer/core/html/forms/html_input_element.idl
third_party/blink/renderer/core/html/forms/html_input_element_test.cc
third_party/blink/renderer/core/html/forms/html_label_element.idl
third_party/blink/renderer/core/html/forms/html_legend_element.idl
third_party/blink/renderer/core/html/forms/html_option_element.cc
third_party/blink/renderer/core/html/forms/html_option_element.idl
third_party/blink/renderer/core/html/forms/html_options_collection.idl
third_party/blink/renderer/core/html/forms/html_select_element.cc
third_party/blink/renderer/core/html/forms/html_select_element.idl
third_party/blink/renderer/core/html/forms/html_text_area_element.idl
third_party/blink/renderer/core/html/forms/select_type.cc
+2 -2
View File
@@ -7,10 +7,10 @@ sha256 = 00a87050fa3f941d04d67fb5763991e0b8ea399a88b505ab0e56dd263f06864c
output_path = ./third_party/search_engines_data/resources_internal
[onboarding]
version = 202509241653
version = 202511061712
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 = fb23110d391419fbbbe2c8f7c3d96765b9b50aa1c20025343ab7f8bd59f9e7ab
sha256 = 5728d2c6806f3f918f7fd0b358935fd4daa34c1117703c564917ede1dac8e199
output_path = ./components/helium_onboarding
# If you are bumping this, you *NEED* to re-strip the assets.json
@@ -579,7 +579,7 @@
} // namespace
--- a/chrome/browser/enterprise/data_protection/data_protection_url_lookup_service.cc
+++ b/chrome/browser/enterprise/data_protection/data_protection_url_lookup_service.cc
@@ -67,8 +67,7 @@ DataProtectionUrlLookupServiceFactory::
@@ -138,8 +138,7 @@ DataProtectionUrlLookupServiceFactory::
// static
DataProtectionUrlLookupServiceFactory*
DataProtectionUrlLookupServiceFactory::GetInstance() {
@@ -591,7 +591,7 @@
// static
--- a/chrome/browser/enterprise/data_protection/data_protection_url_lookup_service.h
+++ b/chrome/browser/enterprise/data_protection/data_protection_url_lookup_service.h
@@ -50,7 +50,6 @@ class DataProtectionUrlLookupServiceFact
@@ -90,7 +90,6 @@ class DataProtectionUrlLookupServiceFact
private:
DataProtectionUrlLookupServiceFactory();
~DataProtectionUrlLookupServiceFactory() override;
@@ -619,7 +619,7 @@
bool site_isolation_enabled;
--- a/chrome/browser/enterprise/signals/profile_signals_collector.cc
+++ b/chrome/browser/enterprise/signals/profile_signals_collector.cc
@@ -70,12 +70,8 @@ void ProfileSignalsCollector::GetProfile
@@ -77,12 +77,8 @@ void ProfileSignalsCollector::GetProfile
signal_response.chrome_remote_desktop_app_blocked =
device_signals::GetChromeRemoteDesktopAppBlocked(
policy_blocklist_service_);
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4993,10 +4993,12 @@ const FeatureEntry::FeatureVariation kSe
@@ -5004,10 +5004,12 @@ const FeatureEntry::FeatureVariation kSe
#include "chrome/browser/ungoogled_flag_choices.h"
#include "chrome/browser/bromite_flag_choices.h"
#include "chrome/browser/ungoogled_platform_flag_choices.h"
@@ -23,16 +23,16 @@
+#ifndef CHROME_BROWSER_EXISTING_SWITCH_FLAG_CHOICES_H_
+#define CHROME_BROWSER_EXISTING_SWITCH_FLAG_CHOICES_H_
+const FeatureEntry::Choice kWebRTCIPPolicy[] = {
+ {"Disable non proxied udp", "", ""},
+ {"Default public interface only",
+ "webrtc-ip-handling-policy",
+ "default_public_interface_only"},
+ {"Default",
+ "webrtc-ip-handling-policy",
+ "default"},
+ {"Default public and private interfaces",
+ "webrtc-ip-handling-policy",
+ "default_public_and_private_interfaces"},
+ {"Default public interface only",
+ "webrtc-ip-handling-policy",
+ "default_public_interface_only"},
+ {"Disable non proxied udp", "", ""},
+};
+#endif // CHROME_BROWSER_EXISTING_SWITCH_FLAG_CHOICES_H_
--- /dev/null
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4989,7 +4989,13 @@ const FeatureEntry::FeatureVariation kSe
@@ -5000,7 +5000,13 @@ const FeatureEntry::FeatureVariation kSe
// calculate and verify checksum.
//
// When adding a new choice, add it to the end of the list.
@@ -2,7 +2,7 @@
#
--- a/components/omnibox/common/omnibox_features.cc
+++ b/components/omnibox/common/omnibox_features.cc
@@ -261,7 +261,7 @@ BASE_FEATURE(kOmniboxTouchDownTriggerFor
@@ -274,7 +274,7 @@ BASE_FEATURE(kOmniboxTouchDownTriggerFor
BASE_FEATURE(kOmniboxSiteSearch, DISABLED);
// Enables additional site search providers for the Site search Starter Pack.
@@ -217,7 +217,7 @@
.Append(kVerifiedContentsFilename);
--- a/extensions/browser/renderer_startup_helper.cc
+++ b/extensions/browser/renderer_startup_helper.cc
@@ -608,6 +608,18 @@ void RendererStartupHelper::GetMessageBu
@@ -666,6 +666,18 @@ void RendererStartupHelper::GetMessageBu
paths_to_load.push_back(imported_extension->path());
}
@@ -115,7 +115,7 @@ TODO: guard services_page.html with is_mac
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -367,6 +367,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -361,6 +361,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
settings_api::PrefType::kBoolean;
(*s_allowlist)[::prefs::kHeliumSpellcheckEnabled] =
settings_api::PrefType::kBoolean;
@@ -126,7 +126,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
@@ -219,6 +219,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -214,6 +214,7 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
@@ -0,0 +1,31 @@
--- a/chrome/browser/ui/views/frame/system_menu_model_builder.cc
+++ b/chrome/browser/ui/views/frame/system_menu_model_builder.cc
@@ -8,6 +8,7 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/app/chrome_command_ids.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_window/public/browser_window_features.h"
#include "chrome/browser/ui/tabs/features.h"
@@ -25,7 +26,6 @@
#if BUILDFLAG(IS_CHROMEOS)
#include "ash/multi_user/multi_user_window_manager.h"
#include "ash/shell.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/settings_window_manager_chromeos.h"
@@ -97,6 +97,12 @@ void SystemMenuModelBuilder::BuildSystem
model->AddItemWithStringId(IDC_BOOKMARK_ALL_TABS, IDS_BOOKMARK_ALL_TABS);
model->AddItemWithStringId(IDC_NAME_WINDOW, IDS_NAME_WINDOW);
+
+ if (!browser()->profile()->IsOffTheRecord()) {
+ model->AddSeparator(ui::NORMAL_SEPARATOR);
+ model->AddItemWithStringId(IDC_SHOW_CUSTOMIZE_CHROME_SIDE_PANEL,
+ IDS_SHOW_CUSTOMIZE_CHROME_SIDE_PANEL);
+ }
#if BUILDFLAG(ENABLE_GLIC)
#if BUILDFLAG(IS_WIN)
// On Windows we can not remove an item when showing the menu. So only add
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
+++ b/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
@@ -1272,6 +1272,9 @@ gfx::Rect FedCmAccountSelectionView::Get
@@ -1280,6 +1280,9 @@ gfx::Rect FedCmAccountSelectionView::Get
void FedCmAccountSelectionView::ShouldShowDialog(bool& should_show) {
if (dialog_type_ == DialogType::BUBBLE) {
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -13399,11 +13399,278 @@ const FeatureEntry kFeatureEntries[] = {
@@ -13410,11 +13410,295 @@ const FeatureEntry kFeatureEntries[] = {
// AboutFlagsHistogramTest unit test to verify this process).
};
@@ -39,6 +39,7 @@
+ "ntp-tab-groups-module",
+ "ntp-tab-groups-module-zero-state",
+ "ntp-microsoft-authentication-module",
+ "ntp-realbox-next",
+
+ // Google Account & Sync
+ "use-sync-sandbox",
@@ -73,6 +74,7 @@
+ "ntp-composebox",
+ "composebox-uses-chrome-compose-client",
+ "compose-selection-nudge",
+ "contextual-tasks",
+
+ // Shopping stuff
+ "product-specifications",
@@ -120,6 +122,10 @@
+ "enable-lens-overlay-straight-to-srp",
+ "enable-lens-overlay-force-empty-csb-query",
+ "contextual-search-open-lens-action-uses-thumbnail",
+ "lens-reinvocation-affordance",
+ "lens-search-zero-state-csb",
+ "lens-updated-feedback-entrypoint",
+ "lens-video-citations",
+
+ // Google Assistant
+ "enable-assistant-dsp",
@@ -159,6 +165,12 @@
+ "glic-fre-pre-warming",
+ "browsing-history-actor-integration-M1",
+
+ // Live captions
+ "enable-headless-live-caption",
+
+ // Google Wallet
+ "wallet-service-use-sandbox",
+
+ // Safety Hub
+ "safety-hub",
+ "safety-hub-magic-stack",
@@ -257,6 +269,11 @@
+ "autofill-enable-support-for-home-and-work",
+ "autofill-enable-support-for-name-and-email-profile",
+ "autofill-update-context-for-web-contents",
+ "autofill-prioritize-save-card-over-mandatory-reauth",
+ "autofill-enable-buy-now-pay-later-updated-suggestion-second-line-string",
+ "autofill-and-passwords-in-same-surface",
+ "autofill-enable-ai-based-amount-extraction",
+ "autofill-prefer-buy-now-pay-later-blocklists",
+
+ // Add new entries above this line and categorize them accordingly.
+});
@@ -280,7 +297,7 @@
FlagsStateSingleton(const FlagsStateSingleton&) = delete;
FlagsStateSingleton& operator=(const FlagsStateSingleton&) = delete;
~FlagsStateSingleton() override = default;
@@ -13422,7 +13689,7 @@ class FlagsStateSingleton : public flags
@@ -13433,7 +13717,7 @@ class FlagsStateSingleton : public flags
void RestoreDefaultState() {
flags_state_ =
@@ -289,7 +306,7 @@
}
private:
@@ -13747,7 +14014,7 @@ base::span<const FeatureEntry> GetFeatur
@@ -13758,7 +14042,7 @@ base::span<const FeatureEntry> GetFeatur
!entries_for_testing->empty()) {
return *entries_for_testing;
}
@@ -0,0 +1,16 @@
--- a/extensions/browser/extension_registrar.cc
+++ b/extensions/browser/extension_registrar.cc
@@ -532,9 +532,12 @@ void ExtensionRegistrar::AddComponentExt
if (old_version.IsValid()) {
UnregisterServiceWorkerWithRootScope(extension);
}
+
+ base::flat_set<int> disable_reasons = GetDisableReasonsOnInstalled(extension);
+
// TODO(crbug.com/40508457): If needed, add support for Declarative Net
// Request to component extensions and pass the ruleset install prefs here.
- AddNewOrUpdatedExtension(extension, {}, kInstallFlagNone,
+ AddNewOrUpdatedExtension(extension, std::move(disable_reasons), kInstallFlagNone,
syncer::StringOrdinal(), std::string(),
/*ruleset_install_prefs=*/{});
return;
+1 -1
View File
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4990,11 +4990,13 @@ const FeatureEntry::FeatureVariation kSe
@@ -5001,11 +5001,13 @@ const FeatureEntry::FeatureVariation kSe
// calculate and verify checksum.
//
// When adding a new choice, add it to the end of the list.
@@ -1,224 +0,0 @@
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -230,6 +230,10 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
(*s_allowlist)[::prefs::kSplitViewDragAndDropEnabled] =
settings_api::PrefType::kBoolean;
+ // Custom toolbar button settings.
+ (*s_allowlist)[::prefs::kShowAvatarButton] =
+ settings_api::PrefType::kBoolean;
+
// Appearance settings.
(*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString;
(*s_allowlist)[::prefs::kPinnedActions] = settings_api::PrefType::kList;
--- a/chrome/browser/ui/actions/chrome_action_id.h
+++ b/chrome/browser/ui/actions/chrome_action_id.h
@@ -558,6 +558,7 @@
#define TOOLBAR_PINNABLE_ACTION_IDS \
E(kActionHome, IDC_HOME) \
E(kActionForward, IDC_FORWARD) \
+ E(kActionAvatar, IDC_SHOW_AVATAR_MENU) \
E(kActionNewIncognitoWindow, IDC_NEW_INCOGNITO_WINDOW) \
E(kActionSendSharedTabGroupFeedback, IDC_SEND_SHARED_TAB_GROUP_FEEDBACK) \
E(kActionShowPasswordManager, IDC_SHOW_PASSWORD_MANAGER) \
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -123,6 +123,9 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(prefs::kPinSplitTabButton, false,
pref_registration_flags);
+ registry->RegisterBooleanPref(
+ prefs::kShowAvatarButton, true);
+
registry->RegisterInt64Pref(prefs::kDefaultBrowserLastDeclined, 0);
registry->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true);
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
--- a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
+++ b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
@@ -216,6 +216,7 @@ void PinnedToolbarActionsModel::UpdatePi
void PinnedToolbarActionsModel::ResetToDefault() {
pref_service_->ClearPref(prefs::kShowHomeButton);
pref_service_->ClearPref(prefs::kShowForwardButton);
+ pref_service_->ClearPref(prefs::kShowAvatarButton);
pref_service_->ClearPref(prefs::kPinnedActions);
}
@@ -229,7 +230,10 @@ bool PinnedToolbarActionsModel::IsDefaul
const bool forward_is_default =
pref_service_->GetDefaultPrefValue(prefs::kShowForwardButton)
->GetBool() == pref_service_->GetBoolean(prefs::kShowForwardButton);
- return action_are_default && home_is_default && forward_is_default;
+ const bool avatar_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowAvatarButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowAvatarButton);
+ return action_are_default && home_is_default && forward_is_default && avatar_is_default;
}
void PinnedToolbarActionsModel::MaybeMigrateExistingPinnedStates() {
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -463,8 +463,7 @@ void ToolbarView::Init() {
#else
// DevTools profiles are OffTheRecord, so hide it there.
show_avatar_toolbar_button = browser_->profile()->IsIncognitoProfile() ||
- browser_->profile()->IsGuestSession() ||
- browser_->profile()->IsRegularProfile();
+ browser_->profile()->IsGuestSession();
#endif
const std::string sab_value = base::CommandLine::ForCurrentProcess()->
@@ -533,6 +532,17 @@ void ToolbarView::Init() {
home_->SetVisible(show_home_button_.GetValue());
+ show_avatar_button_.Init(
+ prefs::kShowAvatarButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowAvatarButtonChanged,
+ base::Unretained(this)));
+
+ // avatar is always shown in incognito and guest profiles,
+ // but in regular profiles it's managed by the kShowAvatarButton pref
+ if (browser_->profile()->IsRegularProfile()) {
+ avatar_->SetVisible(show_avatar_button_.GetValue());
+ }
+
InitLayout();
for (auto* button : std::array<views::Button*, 5>{back_, forward_, reload_,
@@ -1253,6 +1263,10 @@ void ToolbarView::OnShowHomeButtonChange
home_->SetVisible(show_home_button_.GetValue());
}
+void ToolbarView::OnShowAvatarButtonChanged() {
+ avatar_->SetVisible(show_avatar_button_.GetValue());
+}
+
void ToolbarView::OnTouchUiChanged() {
if (display_mode_ == DisplayMode::NORMAL) {
// Update the internal margins for touch layout.
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -268,6 +268,8 @@ class ToolbarView : public views::Access
void OnShowHomeButtonChanged();
+ void OnShowAvatarButtonChanged();
+
void OnTouchUiChanged();
void UpdateClipPath();
@@ -318,6 +320,8 @@ class ToolbarView : public views::Access
// Controls whether or not a home button should be shown on the toolbar.
BooleanPrefMember show_home_button_;
+ BooleanPrefMember show_avatar_button_;
+
BooleanPrefMember show_chrome_labs_button_;
// The display mode used when laying out the toolbar.
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
@@ -16,6 +16,7 @@ enum ActionId {
kShowSearchCompanion,
kHome,
kForward,
+ kAvatar,
kNewIncognitoWindow,
kShowPasswordManager,
kShowPaymentMethods,
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
@@ -50,6 +50,8 @@ MojoActionForChromeAction(actions::Actio
return side_panel::customize_chrome::mojom::ActionId::kHome;
case kActionForward:
return side_panel::customize_chrome::mojom::ActionId::kForward;
+ case kActionAvatar:
+ return side_panel::customize_chrome::mojom::ActionId::kAvatar;
case kActionNewIncognitoWindow:
return side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow;
case kActionShowPasswordsBubbleOrPage:
@@ -109,6 +111,8 @@ std::optional<actions::ActionId> ChromeA
return kActionHome;
case side_panel::customize_chrome::mojom::ActionId::kForward:
return kActionForward;
+ case side_panel::customize_chrome::mojom::ActionId::kAvatar:
+ return kActionAvatar;
case side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow:
return kActionNewIncognitoWindow;
case side_panel::customize_chrome::mojom::ActionId::kShowPasswordManager:
@@ -174,6 +178,10 @@ CustomizeToolbarHandler::CustomizeToolba
prefs::kPinSplitTabButton,
base::BindRepeating(&CustomizeToolbarHandler::OnPinSplitTabButtonChanged,
base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowAvatarButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowAvatarButtonChanged,
+ base::Unretained(this)));
}
CustomizeToolbarHandler::~CustomizeToolbarHandler() = default;
@@ -219,6 +227,19 @@ void CustomizeToolbarHandler::ListAction
actions.push_back(std::move(home_action));
actions.push_back(std::move(forward_action));
+ auto avatar_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionAvatar).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_PROFILES_MENU_NAME)),
+ prefs()->GetBoolean(prefs::kShowAvatarButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kAccountCircleChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ actions.push_back(std::move(avatar_action));
+
if (base::FeatureList::IsEnabled(features::kSideBySide)) {
auto split_tab_action = side_panel::customize_chrome::mojom::Action::New(
MojoActionForChromeAction(kActionSplitTab).value(),
@@ -367,6 +388,9 @@ void CustomizeToolbarHandler::PinAction(
case kActionSplitTab:
prefs()->SetBoolean(prefs::kPinSplitTabButton, pin);
break;
+ case kActionAvatar:
+ prefs()->SetBoolean(prefs::kShowAvatarButton, pin);
+ break;
default:
model_->UpdatePinnedState(chrome_action.value(), pin);
const std::optional<std::string> metrics_name =
@@ -420,6 +444,11 @@ void CustomizeToolbarHandler::OnPinSplit
prefs()->GetBoolean(prefs::kPinSplitTabButton));
}
+void CustomizeToolbarHandler::OnShowAvatarButtonChanged() {
+ OnActionPinnedChanged(kActionAvatar,
+ prefs()->GetBoolean(prefs::kShowAvatarButton));
+}
+
void CustomizeToolbarHandler::OnActionItemChanged() {
client_->NotifyActionsUpdated();
}
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
@@ -54,6 +54,7 @@ class CustomizeToolbarHandler
void OnShowHomeButtonChanged();
void OnShowForwardButtonChanged();
void OnPinSplitTabButtonChanged();
+ void OnShowAvatarButtonChanged();
void OnActionItemChanged();
PrefService* prefs() const;
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -1332,6 +1332,10 @@ inline constexpr char kSplitViewDragAndD
inline constexpr char kSplitViewDragAndDropNudgeUsedCount[] =
"browser.split_view_drag_and_drop_nudge_used_count";
+// A boolean pref set to true if the Avatar button should be visible on the
+// toolbar.
+inline constexpr char kShowAvatarButton[] = "helium.browser.show_avatar_button";
+
// A boolean pref set to true if Gemini integration be enabled. This is managed
// by enterprise policy.
inline constexpr char kGeminiSettings[] = "browser.gemini_settings";
@@ -1,234 +0,0 @@
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -233,6 +233,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
// Custom toolbar button settings.
(*s_allowlist)[::prefs::kShowAvatarButton] =
settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kShowExtensionsButton] =
+ settings_api::PrefType::kBoolean;
// Appearance settings.
(*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString;
--- a/chrome/browser/ui/actions/chrome_action_id.h
+++ b/chrome/browser/ui/actions/chrome_action_id.h
@@ -559,6 +559,7 @@
E(kActionHome, IDC_HOME) \
E(kActionForward, IDC_FORWARD) \
E(kActionAvatar, IDC_SHOW_AVATAR_MENU) \
+ E(kActionExtensions) \
E(kActionNewIncognitoWindow, IDC_NEW_INCOGNITO_WINDOW) \
E(kActionSendSharedTabGroupFeedback, IDC_SEND_SHARED_TAB_GROUP_FEEDBACK) \
E(kActionShowPasswordManager, IDC_SHOW_PASSWORD_MANAGER) \
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -125,6 +125,8 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(
prefs::kShowAvatarButton, true);
+ registry->RegisterBooleanPref(
+ prefs::kShowExtensionsButton, true);
registry->RegisterInt64Pref(prefs::kDefaultBrowserLastDeclined, 0);
registry->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true);
--- a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
+++ b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
@@ -217,6 +217,7 @@ void PinnedToolbarActionsModel::ResetToD
pref_service_->ClearPref(prefs::kShowHomeButton);
pref_service_->ClearPref(prefs::kShowForwardButton);
pref_service_->ClearPref(prefs::kShowAvatarButton);
+ pref_service_->ClearPref(prefs::kShowExtensionsButton);
pref_service_->ClearPref(prefs::kPinnedActions);
}
@@ -233,7 +234,12 @@ bool PinnedToolbarActionsModel::IsDefaul
const bool avatar_is_default =
pref_service_->GetDefaultPrefValue(prefs::kShowAvatarButton)
->GetBool() == pref_service_->GetBoolean(prefs::kShowAvatarButton);
- return action_are_default && home_is_default && forward_is_default && avatar_is_default;
+ const bool extensions_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowExtensionsButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowExtensionsButton);
+ return action_are_default && home_is_default &&
+ forward_is_default && avatar_is_default &&
+ extensions_is_default;
}
void PinnedToolbarActionsModel::MaybeMigrateExistingPinnedStates() {
--- a/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
+++ b/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
@@ -552,7 +552,9 @@ void ExtensionsToolbarContainer::AnchorA
// Fix the position of widgets. Without this fix, extension-installed-bubble
// and extension-uninstall-dialog may be out of the window border on Linux.
- if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
+ if (!browser_->profile()->GetPrefs()->GetBoolean(
+ prefs::kShowExtensionsButton) ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
{
views::View* anchor_view = BrowserView::GetBrowserViewForBrowser(browser_)
->toolbar_button_provider()->GetAppMenuButton();
@@ -962,7 +964,9 @@ void ExtensionsToolbarContainer::UpdateC
}
bool ExtensionsToolbarContainer::ShouldContainerBeVisible() const {
- if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
+ if (!browser_->profile()->GetPrefs()->GetBoolean(
+ prefs::kShowExtensionsButton) ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
return false;
// The container (and extensions-menu button) should not be visible if we have
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -543,6 +543,14 @@ void ToolbarView::Init() {
avatar_->SetVisible(show_avatar_button_.GetValue());
}
+ if (extensions_container_) {
+ show_extensions_button_.Init(
+ prefs::kShowExtensionsButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowExtensionsButtonChanged,
+ base::Unretained(this)));
+ extensions_container_->SetVisible(show_extensions_button_.GetValue());
+ }
+
InitLayout();
for (auto* button : std::array<views::Button*, 5>{back_, forward_, reload_,
@@ -1267,6 +1275,10 @@ void ToolbarView::OnShowAvatarButtonChan
avatar_->SetVisible(show_avatar_button_.GetValue());
}
+void ToolbarView::OnShowExtensionsButtonChanged() {
+ extensions_container_->SetVisible(show_extensions_button_.GetValue());
+}
+
void ToolbarView::OnTouchUiChanged() {
if (display_mode_ == DisplayMode::NORMAL) {
// Update the internal margins for touch layout.
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -270,6 +270,8 @@ class ToolbarView : public views::Access
void OnShowAvatarButtonChanged();
+ void OnShowExtensionsButtonChanged();
+
void OnTouchUiChanged();
void UpdateClipPath();
@@ -322,6 +324,8 @@ class ToolbarView : public views::Access
BooleanPrefMember show_avatar_button_;
+ BooleanPrefMember show_extensions_button_;
+
BooleanPrefMember show_chrome_labs_button_;
// The display mode used when laying out the toolbar.
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
@@ -17,6 +17,7 @@ enum ActionId {
kHome,
kForward,
kAvatar,
+ kExtensions,
kNewIncognitoWindow,
kShowPasswordManager,
kShowPaymentMethods,
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
@@ -52,6 +52,8 @@ MojoActionForChromeAction(actions::Actio
return side_panel::customize_chrome::mojom::ActionId::kForward;
case kActionAvatar:
return side_panel::customize_chrome::mojom::ActionId::kAvatar;
+ case kActionExtensions:
+ return side_panel::customize_chrome::mojom::ActionId::kExtensions;
case kActionNewIncognitoWindow:
return side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow;
case kActionShowPasswordsBubbleOrPage:
@@ -113,6 +115,8 @@ std::optional<actions::ActionId> ChromeA
return kActionForward;
case side_panel::customize_chrome::mojom::ActionId::kAvatar:
return kActionAvatar;
+ case side_panel::customize_chrome::mojom::ActionId::kExtensions:
+ return kActionExtensions;
case side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow:
return kActionNewIncognitoWindow;
case side_panel::customize_chrome::mojom::ActionId::kShowPasswordManager:
@@ -182,6 +186,10 @@ CustomizeToolbarHandler::CustomizeToolba
prefs::kShowAvatarButton,
base::BindRepeating(&CustomizeToolbarHandler::OnShowAvatarButtonChanged,
base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowExtensionsButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowExtensionsButtonChanged,
+ base::Unretained(this)));
}
CustomizeToolbarHandler::~CustomizeToolbarHandler() = default;
@@ -240,6 +248,19 @@ void CustomizeToolbarHandler::ListAction
actions.push_back(std::move(avatar_action));
+ auto extensions_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionExtensions).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_TOOLTIP_EXTENSIONS_BUTTON)),
+ prefs()->GetBoolean(prefs::kShowExtensionsButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kExtensionChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ actions.push_back(std::move(extensions_action));
+
if (base::FeatureList::IsEnabled(features::kSideBySide)) {
auto split_tab_action = side_panel::customize_chrome::mojom::Action::New(
MojoActionForChromeAction(kActionSplitTab).value(),
@@ -391,6 +412,9 @@ void CustomizeToolbarHandler::PinAction(
case kActionAvatar:
prefs()->SetBoolean(prefs::kShowAvatarButton, pin);
break;
+ case kActionExtensions:
+ prefs()->SetBoolean(prefs::kShowExtensionsButton, pin);
+ break;
default:
model_->UpdatePinnedState(chrome_action.value(), pin);
const std::optional<std::string> metrics_name =
@@ -449,6 +473,11 @@ void CustomizeToolbarHandler::OnShowAvat
prefs()->GetBoolean(prefs::kShowAvatarButton));
}
+void CustomizeToolbarHandler::OnShowExtensionsButtonChanged() {
+ OnActionPinnedChanged(kActionExtensions,
+ prefs()->GetBoolean(prefs::kShowExtensionsButton));
+}
+
void CustomizeToolbarHandler::OnActionItemChanged() {
client_->NotifyActionsUpdated();
}
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
@@ -55,6 +55,7 @@ class CustomizeToolbarHandler
void OnShowForwardButtonChanged();
void OnPinSplitTabButtonChanged();
void OnShowAvatarButtonChanged();
+ void OnShowExtensionsButtonChanged();
void OnActionItemChanged();
PrefService* prefs() const;
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -1336,6 +1336,10 @@ inline constexpr char kSplitViewDragAndD
// toolbar.
inline constexpr char kShowAvatarButton[] = "helium.browser.show_avatar_button";
+// A boolean pref set to true if the Extensions button should be visible on the
+// toolbar.
+inline constexpr char kShowExtensionsButton[] = "helium.browser.show_extensions_button";
+
// A boolean pref set to true if Gemini integration be enabled. This is managed
// by enterprise policy.
inline constexpr char kGeminiSettings[] = "browser.gemini_settings";
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
@@ -37,15 +37,6 @@ MojoActionForChromeAction(actions::Actio
@@ -37,28 +37,12 @@ MojoActionForChromeAction(actions::Actio
return side_panel::customize_chrome::mojom::ActionId::kShowBookmarks;
case kActionSidePanelShowHistoryCluster:
return side_panel::customize_chrome::mojom::ActionId::kShowHistoryCluster;
@@ -16,8 +16,7 @@
case kActionHome:
return side_panel::customize_chrome::mojom::ActionId::kHome;
case kActionForward:
@@ -56,13 +47,6 @@ MojoActionForChromeAction(actions::Actio
return side_panel::customize_chrome::mojom::ActionId::kExtensions;
return side_panel::customize_chrome::mojom::ActionId::kForward;
case kActionNewIncognitoWindow:
return side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow;
- case kActionShowPasswordsBubbleOrPage:
@@ -30,7 +29,7 @@
case kActionShowDownloads:
return side_panel::customize_chrome::mojom::ActionId::kShowDownloads;
case kActionClearBrowsingData:
@@ -101,14 +85,6 @@ std::optional<actions::ActionId> ChromeA
@@ -97,26 +81,12 @@ std::optional<actions::ActionId> ChromeA
return kActionSidePanelShowBookmarks;
case side_panel::customize_chrome::mojom::ActionId::kShowHistoryCluster:
return kActionSidePanelShowHistoryCluster;
@@ -45,8 +44,7 @@
case side_panel::customize_chrome::mojom::ActionId::kHome:
return kActionHome;
case side_panel::customize_chrome::mojom::ActionId::kForward:
@@ -119,12 +95,6 @@ std::optional<actions::ActionId> ChromeA
return kActionExtensions;
return kActionForward;
case side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow:
return kActionNewIncognitoWindow;
- case side_panel::customize_chrome::mojom::ActionId::kShowPasswordManager:
@@ -58,7 +56,7 @@
case side_panel::customize_chrome::mojom::ActionId::kShowDownloads:
return kActionShowDownloads;
case side_panel::customize_chrome::mojom::ActionId::kClearBrowsingData:
@@ -322,16 +292,8 @@ void CustomizeToolbarHandler::ListAction
@@ -280,16 +250,8 @@ void CustomizeToolbarHandler::ListAction
add_action(kActionNewIncognitoWindow,
side_panel::customize_chrome::mojom::CategoryId::kNavigation);
@@ -75,7 +73,7 @@
add_action(kActionSidePanelShowHistoryCluster,
side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
add_action(kActionShowDownloads,
@@ -345,18 +307,12 @@ void CustomizeToolbarHandler::ListAction
@@ -303,18 +265,12 @@ void CustomizeToolbarHandler::ListAction
}
add_action(kActionPrint,
side_panel::customize_chrome::mojom::CategoryId::kTools);
@@ -43,7 +43,24 @@
static constexpr Program kCountryDerivedPrograms[] = {
#if BUILDFLAG(IS_IOS)
// Only iOS can derive Taiyaki scope directly from the country.
@@ -351,6 +353,7 @@ RegionalCapabilitiesService::GetChoiceSc
@@ -290,14 +292,13 @@ RegionalCapabilitiesService::GetRegional
}
bool RegionalCapabilitiesService::IsInSearchEngineChoiceScreenRegion() {
- return GetChoiceScreenEligibilityConfig().has_value();
+ return true;
}
// static
bool RegionalCapabilitiesService::IsInSearchEngineChoiceScreenRegion(
const country_codes::CountryId& tested_country_id) {
- return GetSettingsForProgram(CountryIdToProgram(tested_country_id))
- .choice_screen_eligibility_config.has_value();
+ return true;
}
bool RegionalCapabilitiesService::
@@ -358,6 +359,7 @@ RegionalCapabilitiesService::GetChoiceSc
}
bool RegionalCapabilitiesService::IsInEeaCountry() {
@@ -51,17 +68,6 @@
// Feature behaviour was directly based on the current country, as a
// decentralised way to express a concept we are now framing as "program
// settings". Here we check for the program reference directly as command line
--- a/components/regional_capabilities/regional_capabilities_utils.cc
+++ b/components/regional_capabilities/regional_capabilities_utils.cc
@@ -55,7 +55,7 @@ void ShufflePrepopulatedEngines(std::vec
} // namespace
bool IsEeaCountry(country_codes::CountryId country_id) {
- return kEeaChoiceCountriesIds.contains(country_id);
+ return true;
}
std::optional<SearchEngineCountryOverride> GetSearchEngineCountryOverride() {
--- a/components/search_engine_choice_strings.grdp
+++ b/components/search_engine_choice_strings.grdp
@@ -106,6 +106,10 @@
@@ -0,0 +1,21 @@
--- a/components/embedder_support/user_agent_utils.cc
+++ b/components/embedder_support/user_agent_utils.cc
@@ -205,17 +205,12 @@ const blink::UserAgentBrandList GetUserA
int major_version_number;
bool parse_result = base::StringToInt(major_version, &major_version_number);
DCHECK(parse_result);
- std::optional<std::string> brand;
-#if !BUILDFLAG(CHROMIUM_BRANDING)
- brand = version_info::GetProductName();
-#endif
-
std::string brand_version =
output_version_type == blink::UserAgentBrandVersionType::kFullVersion
? full_version
: major_version;
- return GenerateBrandVersionList(major_version_number, brand, brand_version,
+ return GenerateBrandVersionList(major_version_number, "Google Chrome", brand_version,
output_version_type,
additional_brand_version);
}
@@ -57,7 +57,7 @@
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -369,6 +369,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -363,6 +363,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
settings_api::PrefType::kBoolean;
(*s_allowlist)[::prefs::kHeliumUpdateFetchingEnabled] =
settings_api::PrefType::kBoolean;
@@ -68,7 +68,7 @@
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -220,6 +220,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -215,6 +215,7 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
registry->RegisterBooleanPref(prefs::kHeliumUpdateFetchingEnabled, true);
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -147,7 +147,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -142,7 +142,7 @@ void RegisterBrowserUserPrefs(user_prefs
false);
#endif
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
+9 -6
View File
@@ -1,6 +1,6 @@
--- a/chrome/browser/resources/new_tab_page/app.css
+++ b/chrome/browser/resources/new_tab_page/app.css
@@ -137,6 +137,7 @@ cr-most-visited {
@@ -138,6 +138,7 @@ cr-most-visited {
align-items: center;
display: flex;
flex-direction: column;
@@ -10,7 +10,7 @@
padding-top: var(--ntp-one-google-bar-height);
--- a/chrome/browser/resources/new_tab_page/app.html
+++ b/chrome/browser/resources/new_tab_page/app.html
@@ -1,137 +1,11 @@
@@ -1,140 +1,11 @@
-<!-- #html_wrapper_imports_start
-import {nothing} from '//resources/lit/v3_0/lit.rollup.js';
-#html_wrapper_imports_end -->
@@ -47,9 +47,10 @@
- <ntp-logo id="logo" ?single-colored="${this.singleColoredLogo_}"
- .theme="${this.theme_}" ?hidden="${!this.logoEnabled_}">
- </ntp-logo>
- ${this.ntpRealboxNextEnabled_ && (this.dropdownIsVisible_ || this.showComposebox_) ? html`
- ${this.ntpRealboxNextEnabled_ ? html`
- <div id="scrim"
- @click="${this.showComposebox_ && this.composeboxCloseByClickOutside_ ? this.onComposeboxClickOutside_ : nothing}"></div>
- @click="${this.showComposebox_ && this.composeboxCloseByClickOutside_ ? this.onComposeboxClickOutside_ : nothing}"
- ?hidden="${!this.showScrim_}"></div>
- ` : ''}
- <div id="searchboxContainer">
- <cr-searchbox id="searchbox" ?is-dark="${this.isThemeDark_()}"
@@ -66,7 +67,8 @@
- realbox-layout-mode="${this.realboxLayoutMode_}"
- ?ntp-realbox-next-enabled="${this.ntpRealboxNextEnabled_}"
- ?cycling-placeholders="${this.searchboxCyclingPlaceholders_}"
- @dropdown-visible-changed="${this.onDropdownVisibleChanged_}">
- @dropdown-visible-changed="${this.onDropdownVisibleChanged_}"
- @searchbox-input-focus-changed="${this.onInputFocusChanged_}">
- </cr-searchbox>
- ${this.showComposebox_ ? html`
- <ntp-composebox id="composebox" ?is_collapsible="false"
@@ -74,6 +76,7 @@
- @composebox-initialized="${this.onComposeboxInitialized_}"
- @close-composebox="${this.closeComposebox_}"
- @composebox-dropdown-visible-changed="${this.onDropdownVisibleChanged_}"
- @composebox-input-focus-changed="${this.onInputFocusChanged_}"
- realbox-layout-mode="${this.realboxLayoutMode_}">
- </ntp-composebox>
- ` : ''}
@@ -148,7 +151,7 @@
<ntp-customize-buttons id="customizeButtons"
?modules-shown-to-user="${this.modulesShownToUser}"
?show-background-image="${this.showBackgroundImage_}"
@@ -153,23 +27,3 @@ import {nothing} from '//resources/lit/v
@@ -156,23 +27,3 @@ import {nothing} from '//resources/lit/v
` : ''}
<div id="contentBottomSpacer"></div>
</div>
+21 -9
View File
@@ -122,7 +122,7 @@
if (!apps::features::ShouldShowLinkCapturingUX()) {
params.types_enabled.push_back(PageActionIconType::kIntentPicker);
}
@@ -440,54 +433,8 @@ void LocationBarView::Init() {
@@ -440,66 +433,8 @@ void LocationBarView::Init() {
params.types_enabled.push_back(PageActionIconType::kZoom);
params.types_enabled.push_back(PageActionIconType::kFileSystemAccess);
@@ -137,13 +137,25 @@
- params.types_enabled.push_back(PageActionIconType::kVirtualCardEnroll);
- params.types_enabled.push_back(PageActionIconType::kMandatoryReauth);
-
- if (browser_ &&
- base::FeatureList::IsEnabled(omnibox::kAiModeOmniboxEntryPoint)) {
- // The state of the AIM eligibility service can change during runtime but the
- // construction of the location bar happens only once, at window creation. In
- // order to accommodate changing eligibility, the AIM entrypoint is always
- // added here and whether it's enabled or not only affects its visibility.
- // Unless the main AIM omnibox entrypoint Feature is explicitly disabled,
- // which can be used as a kill switch in case of any unanticipated issues with
- // this approach.
- auto* feature_list = base::FeatureList::GetInstance();
- bool aim_omnibox_entrypoint_explicitly_disabled =
- feature_list &&
- feature_list->IsFeatureOverridden(
- omnibox::kAiModeOmniboxEntryPoint.name) &&
- !base::FeatureList::IsEnabled(omnibox::kAiModeOmniboxEntryPoint);
- if (!aim_omnibox_entrypoint_explicitly_disabled) {
- // Position in the leading position, like the entrypoint for
- // kLensOverlayHomework below. While both chips may be enabled, they will
- // not appear at the same time due to different focus behavior. The
- // visibility of this entrypoint is dependent on whether or not the user
- // meets AIM eligibility criteria.
- // meets AIM eligibility criteria (checked elsewhere).
- params.types_enabled.insert(params.types_enabled.begin(),
- PageActionIconType::kAiMode);
- }
@@ -177,7 +189,7 @@
if (browser_ && !is_popup_mode_) {
params.types_enabled.push_back(PageActionIconType::kBookmarkStar);
@@ -538,7 +485,7 @@ void LocationBarView::OnPopupOpened() {
@@ -550,7 +485,7 @@ void LocationBarView::OnPopupOpened() {
int LocationBarView::GetBorderRadius() const {
return ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
@@ -186,7 +198,7 @@
}
std::unique_ptr<views::Background> LocationBarView::CreateRoundRectBackground(
@@ -738,9 +685,9 @@ void LocationBarView::Layout(PassKey) {
@@ -750,9 +685,9 @@ void LocationBarView::Layout(PassKey) {
// TODO(manukh): Move constants to layout_constants.cc.
// The padding between the left edges of the location bar and the LHS icon,
// e.g. the page info icon, the google G icon, the selected suggestion icon.
@@ -198,7 +210,7 @@
// Apply indentation to align the omnibox input icon and the text with those
// of the suggestions in the popup. However, there are two exceptions where
@@ -759,22 +706,22 @@ void LocationBarView::Layout(PassKey) {
@@ -771,22 +706,22 @@ void LocationBarView::Layout(PassKey) {
!location_icon_view_->ShouldShowLabel() &&
!ShouldShowKeywordBubble();
if (should_indent) {
@@ -225,7 +237,7 @@
}
LocationBarLayout leading_decorations(LocationBarLayout::Position::kLeftEdge,
@@ -1272,7 +1219,7 @@ int LocationBarView::GetMinimumTrailingW
@@ -1284,7 +1219,7 @@ int LocationBarView::GetMinimumTrailingW
}
gfx::Rect LocationBarView::GetLocalBoundsWithoutEndcaps() const {
@@ -234,7 +246,7 @@
gfx::Rect bounds_without_endcaps(GetLocalBounds());
bounds_without_endcaps.Inset(gfx::Insets::VH(0, border_radius));
return bounds_without_endcaps;
@@ -1287,9 +1234,9 @@ void LocationBarView::RefreshBackground(
@@ -1299,9 +1234,9 @@ void LocationBarView::RefreshBackground(
ui::NativeTheme::PreferredContrast::kMore;
const auto* const color_provider = GetColorProvider();
@@ -33,3 +33,119 @@
}
}
--- a/third_party/devtools-frontend/src/front_end/panels/settings/BUILD.gn
+++ b/third_party/devtools-frontend/src/front_end/panels/settings/BUILD.gn
@@ -51,7 +51,6 @@ devtools_module("settings") {
"../../ui/legacy/components/utils:bundle",
"../../ui/lit:bundle",
"../utils:bundle",
- "./components:bundle",
]
}
--- a/third_party/devtools-frontend/src/front_end/panels/settings/SettingsScreen.ts
+++ b/third_party/devtools-frontend/src/front_end/panels/settings/SettingsScreen.ts
@@ -20,7 +20,6 @@ import {html, render} from '../../ui/lit
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
import {PanelUtils} from '../utils/utils.js';
-import * as PanelComponents from './components/components.js';
import type {KeybindsSettingsTab} from './KeybindsSettingsTab.js';
import settingsScreenStyles from './settingsScreen.css.js';
@@ -220,11 +219,8 @@ interface SettingsTab {
}
export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
- private readonly syncSection = new PanelComponents.SyncSection.SyncSection();
private readonly settingToControl = new Map<Common.Settings.Setting<unknown>, HTMLElement>();
private readonly containerElement: HTMLElement;
- #updateSyncSectionTimerId = -1;
- #syncSectionUpdatePromise: Promise<void>|null = null;
constructor() {
super({jslog: `${VisualLogging.pane('preferences')}`});
@@ -293,39 +289,13 @@ export class GenericSettingsTab extends
override wasShown(): void {
UI.Context.Context.instance().setFlavor(GenericSettingsTab, this);
super.wasShown();
- this.updateSyncSection();
}
override willHide(): void {
- if (this.#updateSyncSectionTimerId > 0) {
- window.clearTimeout(this.#updateSyncSectionTimerId);
- this.#updateSyncSectionTimerId = -1;
- }
super.willHide();
UI.Context.Context.instance().setFlavor(GenericSettingsTab, null);
}
- private updateSyncSection(): void {
- if (this.#updateSyncSectionTimerId > 0) {
- window.clearTimeout(this.#updateSyncSectionTimerId);
- this.#updateSyncSectionTimerId = -1;
- }
-
- this.#syncSectionUpdatePromise =
- new Promise<Host.InspectorFrontendHostAPI.SyncInformation>(
- resolve => Host.InspectorFrontendHost.InspectorFrontendHostInstance.getSyncInformation(resolve))
- .then(syncInfo => {
- this.syncSection.data = {
- syncInfo,
- syncSetting: Common.Settings.moduleSetting('sync-preferences') as Common.Settings.Setting<boolean>,
- receiveBadgesSetting: Common.Settings.Settings.instance().moduleSetting('receive-gdp-badges'),
- };
- if (!syncInfo.isSyncActive || !syncInfo.arePreferencesSynced) {
- this.#updateSyncSectionTimerId = window.setTimeout(this.updateSyncSection.bind(this), 500);
- }
- });
- }
-
private createExtensionSection(settings: Common.Settings.SettingRegistration[]): void {
const sectionName = Common.Settings.SettingCategory.EXTENSIONS;
const settingUI = Components.Linkifier.LinkHandlerSettingUI.instance() as UI.SettingsUI.SettingUI;
@@ -340,12 +310,7 @@ export class GenericSettingsTab extends
// Always create the EXTENSIONS section and append the link handling control.
if (category === Common.Settings.SettingCategory.EXTENSIONS) {
this.createExtensionSection(settings);
- } else if (category === Common.Settings.SettingCategory.ACCOUNT && settings.length > 0) {
- const syncCard = createSettingsCard(
- Common.SettingRegistration.getLocalizedSettingsCategory(Common.SettingRegistration.SettingCategory.ACCOUNT),
- this.syncSection);
- this.containerElement.appendChild(syncCard);
- } else if (settings.length > 0) {
+ } else if (category !== Common.Settings.SettingCategory.ACCOUNT && settings.length > 0) {
this.createStandardSectionElement(category, settings);
}
}
@@ -375,10 +340,6 @@ export class GenericSettingsTab extends
const element = this.settingToControl.get(setting);
if (element) {
PanelUtils.highlightElement(element);
- } else if (setting.name === 'receive-gdp-badges') {
- void this.#syncSectionUpdatePromise?.then(() => {
- void this.syncSection.highlightReceiveBadgesSetting();
- });
}
}
}
--- a/third_party/devtools-frontend/src/config/gni/devtools_grd_files.gni
+++ b/third_party/devtools-frontend/src/config/gni/devtools_grd_files.gni
@@ -707,7 +707,6 @@ grd_files_bundled_sources = [
"front_end/panels/security/security.js",
"front_end/panels/sensors/sensors-meta.js",
"front_end/panels/sensors/sensors.js",
- "front_end/panels/settings/components/components.js",
"front_end/panels/settings/emulation/components/components.js",
"front_end/panels/settings/emulation/emulation-meta.js",
"front_end/panels/settings/emulation/emulation.js",
@@ -1867,8 +1866,6 @@ grd_files_unbundled_sources = [
"front_end/panels/settings/SettingsScreen.js",
"front_end/panels/settings/WorkspaceSettingsTab.js",
"front_end/panels/settings/aiSettingsTab.css.js",
- "front_end/panels/settings/components/SyncSection.js",
- "front_end/panels/settings/components/syncSection.css.js",
"front_end/panels/settings/emulation/DevicesSettingsTab.js",
"front_end/panels/settings/emulation/components/UserAgentClientHintsForm.js",
"front_end/panels/settings/emulation/components/userAgentClientHintsForm.css.js",
@@ -19,7 +19,7 @@
auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this,
display_mode_ != DisplayMode::NORMAL);
@@ -841,14 +829,6 @@ void ToolbarView::Layout(PassKey) {
@@ -823,14 +811,6 @@ void ToolbarView::Layout(PassKey) {
// The container view should be the exact same size/position as ToolbarView.
container_view_->SetSize(size());
@@ -34,7 +34,7 @@
if (display_mode_ == DisplayMode::CUSTOM_TAB) {
custom_tab_bar_->SetBounds(0, 0, width(),
custom_tab_bar_->GetPreferredSize().height());
@@ -858,7 +838,6 @@ void ToolbarView::Layout(PassKey) {
@@ -840,7 +820,6 @@ void ToolbarView::Layout(PassKey) {
if (display_mode_ == DisplayMode::NORMAL) {
LayoutCommon();
@@ -42,7 +42,7 @@
}
if (toolbar_controller_) {
@@ -896,38 +875,6 @@ void ToolbarView::OnThemeChanged() {
@@ -878,38 +857,6 @@ void ToolbarView::OnThemeChanged() {
SchedulePaint();
}
@@ -0,0 +1,529 @@
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -1336,6 +1336,26 @@ inline constexpr char kSplitViewDragAndD
inline constexpr char kSplitViewDragAndDropNudgeUsedCount[] =
"browser.split_view_drag_and_drop_nudge_used_count";
+// A boolean pref set to true if the Back button should be visible on the
+// toolbar.
+inline constexpr char kShowBackButton[] = "helium.browser.show_back_button";
+
+// A boolean pref set to true if the Reload button should be visible on the
+// toolbar.
+inline constexpr char kShowReloadButton[] = "helium.browser.show_reload_button";
+
+// A boolean pref set to true if the Avatar button should be visible on the
+// toolbar.
+inline constexpr char kShowAvatarButton[] = "helium.browser.show_avatar_button";
+
+// A boolean pref set to true if the Extensions button should be visible on the
+// toolbar.
+inline constexpr char kShowExtensionsButton[] = "helium.browser.show_extensions_button";
+
+// A boolean pref set to true if the Menu button should be visible on the
+// toolbar.
+inline constexpr char kShowMenuButton[] = "helium.browser.show_menu_button";
+
// A boolean pref set to true if Gemini integration be enabled. This is managed
// by enterprise policy.
inline constexpr char kGeminiSettings[] = "browser.gemini_settings";
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -125,6 +125,12 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(prefs::kPinSplitTabButton, false,
pref_registration_flags);
+ registry->RegisterBooleanPref(prefs::kShowBackButton, true);
+ registry->RegisterBooleanPref(prefs::kShowReloadButton, true);
+ registry->RegisterBooleanPref(prefs::kShowAvatarButton, true);
+ registry->RegisterBooleanPref(prefs::kShowExtensionsButton, true);
+ registry->RegisterBooleanPref(prefs::kShowMenuButton, true);
+
registry->RegisterInt64Pref(prefs::kDefaultBrowserLastDeclined, 0);
registry->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true);
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -234,6 +234,18 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
(*s_allowlist)[::prefs::kSplitViewDragAndDropEnabled] =
settings_api::PrefType::kBoolean;
+ // Helium toolbar settings.
+ (*s_allowlist)[::prefs::kShowBackButton] =
+ settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kShowReloadButton] =
+ settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kShowAvatarButton] =
+ settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kShowExtensionsButton] =
+ settings_api::PrefType::kBoolean;
+ (*s_allowlist)[::prefs::kShowMenuButton] =
+ settings_api::PrefType::kBoolean;
+
// Appearance settings.
(*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString;
(*s_allowlist)[::prefs::kPinnedActions] = settings_api::PrefType::kList;
--- a/chrome/browser/ui/actions/chrome_action_id.h
+++ b/chrome/browser/ui/actions/chrome_action_id.h
@@ -558,6 +558,8 @@
#define TOOLBAR_PINNABLE_ACTION_IDS \
E(kActionHome, IDC_HOME) \
E(kActionForward, IDC_FORWARD) \
+ E(kActionAvatar, IDC_SHOW_AVATAR_MENU) \
+ E(kActionExtensions) \
E(kActionNewIncognitoWindow, IDC_NEW_INCOGNITO_WINDOW) \
E(kActionSendSharedTabGroupFeedback, IDC_SEND_SHARED_TAB_GROUP_FEEDBACK) \
E(kActionShowPasswordManager, IDC_SHOW_PASSWORD_MANAGER) \
--- a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
+++ b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
@@ -216,6 +216,11 @@ void PinnedToolbarActionsModel::UpdatePi
void PinnedToolbarActionsModel::ResetToDefault() {
pref_service_->ClearPref(prefs::kShowHomeButton);
pref_service_->ClearPref(prefs::kShowForwardButton);
+ pref_service_->ClearPref(prefs::kShowBackButton);
+ pref_service_->ClearPref(prefs::kShowReloadButton);
+ pref_service_->ClearPref(prefs::kShowAvatarButton);
+ pref_service_->ClearPref(prefs::kShowExtensionsButton);
+ pref_service_->ClearPref(prefs::kShowMenuButton);
pref_service_->ClearPref(prefs::kPinnedActions);
}
@@ -229,7 +234,24 @@ bool PinnedToolbarActionsModel::IsDefaul
const bool forward_is_default =
pref_service_->GetDefaultPrefValue(prefs::kShowForwardButton)
->GetBool() == pref_service_->GetBoolean(prefs::kShowForwardButton);
- return action_are_default && home_is_default && forward_is_default;
+ const bool back_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowBackButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowBackButton);
+ const bool reload_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowReloadButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowReloadButton);
+ const bool avatar_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowAvatarButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowAvatarButton);
+ const bool extensions_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowExtensionsButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowExtensionsButton);
+ const bool menu_is_default =
+ pref_service_->GetDefaultPrefValue(prefs::kShowMenuButton)
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowMenuButton);
+ return action_are_default && home_is_default && forward_is_default &&
+ back_is_default && reload_is_default && avatar_is_default &&
+ extensions_is_default && menu_is_default;
}
void PinnedToolbarActionsModel::MaybeMigrateExistingPinnedStates() {
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -451,8 +451,7 @@ void ToolbarView::Init() {
#else
// DevTools profiles are OffTheRecord, so hide it there.
show_avatar_toolbar_button = browser_->profile()->IsIncognitoProfile() ||
- browser_->profile()->IsGuestSession() ||
- browser_->profile()->IsRegularProfile();
+ browser_->profile()->IsGuestSession();
#endif
const std::string sab_value = base::CommandLine::ForCurrentProcess()->
@@ -521,6 +520,48 @@ void ToolbarView::Init() {
home_->SetVisible(show_home_button_.GetValue());
+ show_back_button_.Init(
+ prefs::kShowBackButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowBackButtonChanged,
+ base::Unretained(this)));
+
+ back_->SetVisible(show_back_button_.GetValue());
+
+ show_reload_button_.Init(
+ prefs::kShowReloadButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowReloadButtonChanged,
+ base::Unretained(this)));
+
+ reload_->SetVisible(show_reload_button_.GetValue());
+
+ show_avatar_button_.Init(
+ prefs::kShowAvatarButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowAvatarButtonChanged,
+ base::Unretained(this)));
+
+ // Avatar is always shown in incognito and guest profiles,
+ // but in regular profiles it's managed by kShowAvatarButton pref.
+ if (browser_->profile()->IsRegularProfile()) {
+ avatar_->SetVisible(show_avatar_button_.GetValue());
+ }
+
+ if (extensions_container_) {
+ show_extensions_button_.Init(
+ prefs::kShowExtensionsButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowExtensionsButtonChanged,
+ base::Unretained(this)));
+ extensions_container_->SetVisible(show_extensions_button_.GetValue());
+ }
+
+ if (app_menu_button_) {
+ show_menu_button_.Init(
+ prefs::kShowMenuButton, prefs,
+ base::BindRepeating(&ToolbarView::OnShowMenuButtonChanged,
+ base::Unretained(this)));
+
+ app_menu_button_->SetVisible(show_menu_button_.GetValue());
+ }
+
InitLayout();
for (auto* button : std::array<views::Button*, 5>{back_, forward_, reload_,
@@ -1234,10 +1275,33 @@ void ToolbarView::OnShowForwardButtonCha
InvalidateLayout();
}
+void ToolbarView::OnShowBackButtonChanged() {
+ back_->SetVisible(show_back_button_.GetValue());
+ InvalidateLayout();
+}
+
+void ToolbarView::OnShowReloadButtonChanged() {
+ reload_->SetVisible(show_reload_button_.GetValue());
+ InvalidateLayout();
+}
+
void ToolbarView::OnShowHomeButtonChanged() {
home_->SetVisible(show_home_button_.GetValue());
}
+void ToolbarView::OnShowAvatarButtonChanged() {
+ avatar_->SetVisible(show_avatar_button_.GetValue());
+}
+
+void ToolbarView::OnShowExtensionsButtonChanged() {
+ extensions_container_->SetVisible(show_extensions_button_.GetValue());
+}
+
+void ToolbarView::OnShowMenuButtonChanged() {
+ app_menu_button_->SetVisible(show_menu_button_.GetValue());
+ InvalidateLayout();
+}
+
void ToolbarView::OnTouchUiChanged() {
if (display_mode_ == DisplayMode::NORMAL) {
// Update the internal margins for touch layout.
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -277,6 +277,16 @@ class ToolbarView : public views::Access
void OnShowHomeButtonChanged();
+ void OnShowBackButtonChanged();
+
+ void OnShowReloadButtonChanged();
+
+ void OnShowAvatarButtonChanged();
+
+ void OnShowExtensionsButtonChanged();
+
+ void OnShowMenuButtonChanged();
+
void OnTouchUiChanged();
void UpdateClipPath();
@@ -327,6 +337,16 @@ class ToolbarView : public views::Access
// Controls whether or not a home button should be shown on the toolbar.
BooleanPrefMember show_home_button_;
+ BooleanPrefMember show_back_button_;
+
+ BooleanPrefMember show_reload_button_;
+
+ BooleanPrefMember show_avatar_button_;
+
+ BooleanPrefMember show_extensions_button_;
+
+ BooleanPrefMember show_menu_button_;
+
BooleanPrefMember show_chrome_labs_button_;
// The display mode used when laying out the toolbar.
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
@@ -16,6 +16,11 @@ enum ActionId {
kShowSearchCompanion,
kHome,
kForward,
+ kBack,
+ kReload,
+ kAvatar,
+ kExtensions,
+ kMenu,
kNewIncognitoWindow,
kShowPasswordManager,
kShowPaymentMethods,
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
@@ -41,6 +41,16 @@ MojoActionForChromeAction(actions::Actio
return side_panel::customize_chrome::mojom::ActionId::kHome;
case kActionForward:
return side_panel::customize_chrome::mojom::ActionId::kForward;
+ case kActionBack:
+ return side_panel::customize_chrome::mojom::ActionId::kBack;
+ case kActionReload:
+ return side_panel::customize_chrome::mojom::ActionId::kReload;
+ case kActionAvatar:
+ return side_panel::customize_chrome::mojom::ActionId::kAvatar;
+ case kActionExtensions:
+ return side_panel::customize_chrome::mojom::ActionId::kExtensions;
+ case kActionShowAppMenu:
+ return side_panel::customize_chrome::mojom::ActionId::kMenu;
case kActionNewIncognitoWindow:
return side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow;
case kActionShowDownloads:
@@ -85,6 +95,16 @@ std::optional<actions::ActionId> ChromeA
return kActionHome;
case side_panel::customize_chrome::mojom::ActionId::kForward:
return kActionForward;
+ case side_panel::customize_chrome::mojom::ActionId::kBack:
+ return kActionBack;
+ case side_panel::customize_chrome::mojom::ActionId::kReload:
+ return kActionReload;
+ case side_panel::customize_chrome::mojom::ActionId::kAvatar:
+ return kActionAvatar;
+ case side_panel::customize_chrome::mojom::ActionId::kExtensions:
+ return kActionExtensions;
+ case side_panel::customize_chrome::mojom::ActionId::kMenu:
+ return kActionShowAppMenu;
case side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow:
return kActionNewIncognitoWindow;
case side_panel::customize_chrome::mojom::ActionId::kShowDownloads:
@@ -144,6 +164,26 @@ CustomizeToolbarHandler::CustomizeToolba
prefs::kPinSplitTabButton,
base::BindRepeating(&CustomizeToolbarHandler::OnPinSplitTabButtonChanged,
base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowBackButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowBackButtonChanged,
+ base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowReloadButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowReloadButtonChanged,
+ base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowAvatarButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowAvatarButtonChanged,
+ base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowExtensionsButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowExtensionsButtonChanged,
+ base::Unretained(this)));
+ pref_change_registrar_.Add(
+ prefs::kShowMenuButton,
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowMenuButtonChanged,
+ base::Unretained(this)));
}
CustomizeToolbarHandler::~CustomizeToolbarHandler() = default;
@@ -186,8 +226,64 @@ void CustomizeToolbarHandler::ListAction
.Rasterize(&provider),
scale_factor)));
- actions.push_back(std::move(home_action));
+ auto back_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionBack).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_ACCNAME_BACK)),
+ prefs()->GetBoolean(prefs::kShowBackButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kNavigation,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kBackArrowChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ auto reload_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionReload).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD)),
+ prefs()->GetBoolean(prefs::kShowReloadButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kNavigation,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kReloadChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ auto avatar_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionAvatar).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_PROFILES_MENU_NAME)),
+ prefs()->GetBoolean(prefs::kShowAvatarButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kAccountCircleChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ auto extensions_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionExtensions).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_TOOLTIP_EXTENSIONS_BUTTON)),
+ prefs()->GetBoolean(prefs::kShowExtensionsButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(
+ vector_icons::kExtensionChromeRefreshIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ auto menu_action = side_panel::customize_chrome::mojom::Action::New(
+ MojoActionForChromeAction(kActionShowAppMenu).value(),
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_ACCNAME_APP_MENU)),
+ prefs()->GetBoolean(prefs::kShowMenuButton), false,
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
+ GURL(webui::EncodePNGAndMakeDataURI(
+ ui::ImageModel::FromVectorIcon(kBrowserToolsIcon, icon_color_id)
+ .Rasterize(&provider),
+ scale_factor)));
+
+ actions.push_back(std::move(back_action));
actions.push_back(std::move(forward_action));
+ actions.push_back(std::move(reload_action));
+ actions.push_back(std::move(home_action));
if (base::FeatureList::IsEnabled(features::kSideBySide)) {
auto split_tab_action = side_panel::customize_chrome::mojom::Action::New(
@@ -203,6 +299,10 @@ void CustomizeToolbarHandler::ListAction
actions.push_back(std::move(split_tab_action));
}
+ actions.push_back(std::move(extensions_action));
+ actions.push_back(std::move(avatar_action));
+ actions.push_back(std::move(menu_action));
+
const auto add_action =
[&actions, this, &provider, scale_factor, bwi](
actions::ActionId id,
@@ -247,17 +347,16 @@ void CustomizeToolbarHandler::ListAction
actions.push_back(std::move(mojo_action));
};
- add_action(kActionNewIncognitoWindow,
- side_panel::customize_chrome::mojom::CategoryId::kNavigation);
-
add_action(kActionSidePanelShowBookmarks,
- side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
+ side_panel::customize_chrome::mojom::CategoryId::kTools);
add_action(kActionSidePanelShowHistoryCluster,
- side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
+ side_panel::customize_chrome::mojom::CategoryId::kTools);
add_action(kActionShowDownloads,
- side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
+ side_panel::customize_chrome::mojom::CategoryId::kTools);
add_action(kActionClearBrowsingData,
- side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
+ side_panel::customize_chrome::mojom::CategoryId::kTools);
+ add_action(kActionNewIncognitoWindow,
+ side_panel::customize_chrome::mojom::CategoryId::kTools);
if (features::HasTabSearchToolbarButton()) {
add_action(kActionTabSearch,
@@ -323,6 +422,21 @@ void CustomizeToolbarHandler::PinAction(
case kActionSplitTab:
prefs()->SetBoolean(prefs::kPinSplitTabButton, pin);
break;
+ case kActionBack:
+ prefs()->SetBoolean(prefs::kShowBackButton, pin);
+ break;
+ case kActionReload:
+ prefs()->SetBoolean(prefs::kShowReloadButton, pin);
+ break;
+ case kActionAvatar:
+ prefs()->SetBoolean(prefs::kShowAvatarButton, pin);
+ break;
+ case kActionExtensions:
+ prefs()->SetBoolean(prefs::kShowExtensionsButton, pin);
+ break;
+ case kActionShowAppMenu:
+ prefs()->SetBoolean(prefs::kShowMenuButton, pin);
+ break;
default:
model_->UpdatePinnedState(chrome_action.value(), pin);
const std::optional<std::string> metrics_name =
@@ -376,6 +490,31 @@ void CustomizeToolbarHandler::OnPinSplit
prefs()->GetBoolean(prefs::kPinSplitTabButton));
}
+void CustomizeToolbarHandler::OnShowBackButtonChanged() {
+ OnActionPinnedChanged(kActionBack,
+ prefs()->GetBoolean(prefs::kShowBackButton));
+}
+
+void CustomizeToolbarHandler::OnShowReloadButtonChanged() {
+ OnActionPinnedChanged(kActionReload,
+ prefs()->GetBoolean(prefs::kShowReloadButton));
+}
+
+void CustomizeToolbarHandler::OnShowAvatarButtonChanged() {
+ OnActionPinnedChanged(kActionAvatar,
+ prefs()->GetBoolean(prefs::kShowAvatarButton));
+}
+
+void CustomizeToolbarHandler::OnShowExtensionsButtonChanged() {
+ OnActionPinnedChanged(kActionExtensions,
+ prefs()->GetBoolean(prefs::kShowExtensionsButton));
+}
+
+void CustomizeToolbarHandler::OnShowMenuButtonChanged() {
+ OnActionPinnedChanged(kActionShowAppMenu,
+ prefs()->GetBoolean(prefs::kShowMenuButton));
+}
+
void CustomizeToolbarHandler::OnActionItemChanged() {
client_->NotifyActionsUpdated();
}
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
@@ -54,6 +54,11 @@ class CustomizeToolbarHandler
void OnShowHomeButtonChanged();
void OnShowForwardButtonChanged();
void OnPinSplitTabButtonChanged();
+ void OnShowBackButtonChanged();
+ void OnShowReloadButtonChanged();
+ void OnShowAvatarButtonChanged();
+ void OnShowExtensionsButtonChanged();
+ void OnShowMenuButtonChanged();
void OnActionItemChanged();
PrefService* prefs() const;
--- a/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
+++ b/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
@@ -552,7 +552,9 @@ void ExtensionsToolbarContainer::AnchorA
// Fix the position of widgets. Without this fix, extension-installed-bubble
// and extension-uninstall-dialog may be out of the window border on Linux.
- if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
+ if (!browser_->profile()->GetPrefs()->GetBoolean(
+ prefs::kShowExtensionsButton) ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
{
views::View* anchor_view = BrowserView::GetBrowserViewForBrowser(browser_)
->toolbar_button_provider()->GetAppMenuButton();
@@ -962,7 +964,9 @@ void ExtensionsToolbarContainer::UpdateC
}
bool ExtensionsToolbarContainer::ShouldContainerBeVisible() const {
- if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
+ if (!browser_->profile()->GetPrefs()->GetBoolean(
+ prefs::kShowExtensionsButton) ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
return false;
// 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
@@ -10358,6 +10358,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>
+ <message name="IDS_ACCNAME_APP_MENU" desc="The accessible name for the app menu button.">
+ Main Menu
+ </message>
<message name="IDS_ACCNAME_BOOKMARKS" desc="The accessible name for the Bookmarks toolbar.">
Bookmarks
</message>
@@ -0,0 +1,86 @@
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -4868,6 +4868,18 @@ int BrowserView::NonClientHitTest(const
}
}
+ // The empty spaces in toolbar should allow mouse events to fall
+ // through to the caption area.
+ if (toolbar_) {
+ gfx::Point test_point(point);
+ if (ConvertedHitTest(parent(), toolbar_, &test_point)) {
+ if (toolbar_->IsPositionInWindowCaption(test_point)) {
+ return HTCAPTION;
+ }
+ return HTCLIENT;
+ }
+ }
+
// Let the frame handle any events that fall within the bounds of the window
// controls overlay.
if (IsWindowControlsOverlayEnabled() && GetActiveWebContents()) {
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -646,6 +646,44 @@ bool ToolbarView::GetAppMenuFocused() co
return app_menu_button_ && app_menu_button_->HasFocus();
}
+bool ToolbarView::IsRectInWindowCaption(const gfx::Rect& rect) const {
+ // Clickable elements are only in container view. If the container view is not
+ // visible, then the rect is in the window caption.
+ if (!container_view_ || !container_view_->GetVisible()) {
+ return true;
+ }
+
+ const auto get_target_rect = [&](views::View* target) {
+ gfx::RectF rect_in_target_coords_f(rect);
+ views::View::ConvertRectToTarget(this, target, &rect_in_target_coords_f);
+ return gfx::ToEnclosingRect(rect_in_target_coords_f);
+ };
+
+ // 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.
+ for (views::View* const child : container_view_->children()) {
+ if (!child->GetVisible()) {
+ continue;
+ }
+
+ const gfx::Rect target_rect = get_target_rect(child);
+ if (child->GetLocalBounds().Intersects(target_rect)) {
+ // Check if the rect is actually on the child.
+ if (child->HitTestRect(target_rect)) {
+ return false;
+ }
+ }
+ }
+
+ // The rect is not on any clickable element, so it's in the window caption.
+ return true;
+}
+
+bool ToolbarView::IsPositionInWindowCaption(const gfx::Point& point) const {
+ return IsRectInWindowCaption(gfx::Rect(point, gfx::Size(1, 1)));
+}
+
void ToolbarView::ShowIntentPickerBubble(
std::vector<IntentPickerBubbleView::AppInfo> app_info,
bool show_stay_in_chrome,
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -126,6 +126,15 @@ class ToolbarView : public views::Access
// Returns true if the app menu is focused.
bool GetAppMenuFocused() const;
+ // Returns true if the specified rect is not on a clickable element,
+ // aka container view children: toolbar buttons, location bar, etc.
+ bool IsRectInWindowCaption(const gfx::Rect& rect) const;
+
+ // A convenience function which calls |IsRectInWindowCaption()| with a rect of
+ // size 1x1 and an origin of |point|. |point| is in the local coordinate space
+ // of |this|.
+ bool IsPositionInWindowCaption(const gfx::Point& point) const;
+
void ShowIntentPickerBubble(
std::vector<IntentPickerBubbleView::AppInfo> app_info,
bool show_stay_in_chrome,
@@ -87,7 +87,7 @@
};
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -13303,6 +13303,9 @@ Check your passwords anytime in <ph name
@@ -13306,6 +13306,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>
+7 -2
View File
@@ -1,6 +1,8 @@
upstream-fixes/glue_core_pools.patch
upstream-fixes/hardware_destructive_interference_size.patch
upstream-fixes/missing-dependencies.patch
upstream-fixes/fix-crash-without-enterprise-cloud-content-analysis.patch
upstream-fixes/fix-python-codecs-deprecation.patch
core/inox-patchset/0001-fix-building-without-safebrowsing.patch
core/inox-patchset/0003-disable-autofill-download-manager.patch
@@ -140,10 +142,9 @@ helium/core/disable-user-education-nags.patch
helium/core/replace-default-profile-name.patch
helium/core/disable-live-caption-completely.patch
helium/core/spoof-extension-downloader-platform.patch
helium/core/spoof-chrome-ua-brand.patch
helium/core/add-helium-versioning.patch
helium/core/enable-tab-search-toolbar-button.patch
helium/core/hide-avatar-via-toolbar-prefs.patch
helium/core/hide-extensions-via-toolbar-prefs.patch
helium/core/clean-context-menu.patch
helium/core/split-view.patch
helium/core/fix-tab-sync-unreached-error.patch
@@ -159,6 +160,7 @@ helium/core/disable-outdated-build-detector.patch
helium/core/remove-dead-toolbar-actions.patch
helium/core/add-component-l10n-support.patch
helium/core/add-component-managed-schema-support.patch
helium/core/fix-component-extension-reenablement.patch
helium/core/ublock-setup-sources.patch
helium/core/ublock-install-as-component.patch
helium/core/ublock-reconfigure-defaults.patch
@@ -178,6 +180,7 @@ helium/core/disable-update-toast.patch
helium/core/disable-fedcm-bubble.patch
helium/core/add-middle-click-autoscroll-flag.patch
helium/core/webrtc-default-handling-policy.patch
helium/core/browser-window-context-menu.patch
helium/settings/move-search-suggest.patch
helium/settings/remove-autofill.patch
@@ -208,6 +211,8 @@ helium/ui/layout-constants.patch
helium/ui/tabs.patch
helium/ui/tab-strip-controls.patch
helium/ui/toolbar.patch
helium/ui/toolbar-window-frame-hit-test.patch
helium/ui/toolbar-button-prefs.patch
helium/ui/omnibox.patch
helium/ui/app-menu-style.patch
helium/ui/app-menu-model.patch
@@ -0,0 +1,79 @@
From ad7a79a81bde832c4c3e1ebac56c5072c5e23fbf Mon Sep 17 00:00:00 2001
From: jj <jj@imput.net>
Date: Sat, 01 Nov 2025 15:28:33 +0100
Subject: [PATCH] Fix failing CHECK on builds with enterprise_cloud_content_analysis=false
Adds additional compile guards to prevent a failing CHECK when Chromium
is built with enterprise_cloud_content_analysis=false, which causes
connectors_service_ to not be initialized.
Bug: 456770303
Change-Id: Iae2978f1faa463c318a2c0cf7c131746c5a399de
---
--- a/chrome/browser/enterprise/signals/profile_signals_collector.cc
+++ b/chrome/browser/enterprise/signals/profile_signals_collector.cc
@@ -22,7 +22,10 @@
#include "components/policy/core/common/cloud/cloud_policy_manager.h"
#include "components/prefs/pref_service.h"
#include "components/version_info/version_info.h"
+
+#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
#include "chrome/browser/enterprise/connectors/connectors_service.h"
+#endif // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
namespace device_signals {
@@ -52,7 +55,11 @@ ProfileSignalsCollector::ProfileSignalsC
#endif // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
profile_id_service_(
enterprise::ProfileIdServiceFactory::GetForProfile(profile)) {
+
+#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
CHECK(connectors_service_);
+#endif // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
+
CHECK(policy_blocklist_service_);
CHECK(profile_id_service_);
}
@@ -79,6 +86,8 @@ void ProfileSignalsCollector::GetProfile
signal_response.site_isolation_enabled =
device_signals::GetSiteIsolationEnabled();
signal_response.profile_id = profile_id_service_->GetProfileId();
+
+#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
signal_response.realtime_url_check_mode =
connectors_service_->GetAppliedRealTimeUrlCheck();
signal_response.security_event_providers =
@@ -97,6 +106,7 @@ void ProfileSignalsCollector::GetProfile
connectors_service_->GetAnalysisServiceProviderNames(
enterprise_connectors::PRINT);
#endif // !BUILDFLAG(IS_ANDROID)
+#endif // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
response.profile_signals_response = std::move(signal_response);
--- a/chrome/browser/enterprise/signals/profile_signals_collector.h
+++ b/chrome/browser/enterprise/signals/profile_signals_collector.h
@@ -8,6 +8,7 @@
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "components/device_signals/core/browser/base_signals_collector.h"
+#include "components/enterprise/buildflags/buildflags.h"
class PrefService;
class Profile;
@@ -45,8 +46,12 @@ class ProfileSignalsCollector : public B
const raw_ptr<PolicyBlocklistService> policy_blocklist_service_;
const raw_ptr<PrefService> profile_prefs_;
const raw_ptr<policy::CloudPolicyManager> policy_manager_;
- const raw_ptr<enterprise_connectors::ConnectorsService> connectors_service_;
const raw_ptr<enterprise::ProfileIdService> profile_id_service_;
+
+#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) || BUILDFLAG(IS_ANDROID)
+ const raw_ptr<enterprise_connectors::ConnectorsService> connectors_service_;
+#endif
+
base::WeakPtrFactory<ProfileSignalsCollector> weak_factory_{this};
};
@@ -0,0 +1,39 @@
From 9c7aa2956eebd3f739dc9f60d041923cdb9ffa06 Mon Sep 17 00:00:00 2001
From: jj <jj@imput.net>
Date: Thu, 06 Nov 2025 09:27:04 -0800
Subject: [PATCH] Remove unneeded codecs usage in mojom_parser
Python >=3.14 loudly complains on every mojom_parser use, with:
DeprecationWarning: codecs.open() is deprecated. Use open() instead.
`codecs` has not been useful for a long time, so let's drop it,
and simply call open() instead.
Change-Id: Iaf4ab7bcdefb4c2b31aa825bac5d79970db0ba46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7123066
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1541277}
---
--- a/mojo/public/tools/mojom/mojom_parser.py
+++ b/mojo/public/tools/mojom/mojom_parser.py
@@ -12,7 +12,6 @@ generate usable language bindings.
import argparse
import builtins
-import codecs
import errno
import json
import logging
@@ -180,7 +179,7 @@ def _CollectAllowedImportsFromBuildMetad
# multiprocessing helper.
def _ParseAstHelper(mojom_abspath, enabled_features):
- with codecs.open(mojom_abspath, encoding='utf-8') as f:
+ with open(mojom_abspath, encoding='utf-8') as f:
ast = parser.Parse(f.read(), mojom_abspath)
conditional_features.RemoveDisabledDefinitions(ast, enabled_features)
return mojom_abspath, ast
+1 -1
View File
@@ -1 +1 @@
2
4