mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2025-07-21 00:21:28 +03:00
few small patches - disable chromelabs pinning and pin nxtscape views on old profiles too
This commit is contained in:
49
patches/nxtscape/disable-chrome-labs-pinning.patch
Normal file
49
patches/nxtscape/disable-chrome-labs-pinning.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
From 80fc1ca1096e8cb2c0858d695d3a0c359d9681e5 Mon Sep 17 00:00:00 2001
|
||||
From: Nikhil Sonti <nikhilsv92@gmail.com>
|
||||
Date: Fri, 11 Jul 2025 13:07:04 -0700
|
||||
Subject: [PATCH] disable chromelabs pinned by default
|
||||
|
||||
---
|
||||
.../pinned_toolbar/pinned_toolbar_actions_model.cc | 4 +++-
|
||||
chrome/browser/ui/toolbar/toolbar_pref_names.cc | 9 +--------
|
||||
2 files changed, 4 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
|
||||
index 3fd0ec6cd8da1..0b554e8cfe999 100644
|
||||
--- a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
|
||||
+++ b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
|
||||
@@ -236,8 +236,10 @@ void PinnedToolbarActionsModel::MaybeMigrateExistingPinnedStates() {
|
||||
if (!CanUpdate()) {
|
||||
return;
|
||||
}
|
||||
+ // Chrome Labs is no longer automatically pinned for new profiles
|
||||
+ // We keep this migration complete check to not affect users who already have it
|
||||
if (!pref_service_->GetBoolean(prefs::kPinnedChromeLabsMigrationComplete)) {
|
||||
- UpdatePinnedState(kActionShowChromeLabs, true);
|
||||
+ // UpdatePinnedState(kActionShowChromeLabs, true); // No longer auto-pin
|
||||
pref_service_->SetBoolean(prefs::kPinnedChromeLabsMigrationComplete, true);
|
||||
}
|
||||
if (features::HasTabSearchToolbarButton() &&
|
||||
diff --git a/chrome/browser/ui/toolbar/toolbar_pref_names.cc b/chrome/browser/ui/toolbar/toolbar_pref_names.cc
|
||||
index 343376dd051fb..d2868cb83608f 100644
|
||||
--- a/chrome/browser/ui/toolbar/toolbar_pref_names.cc
|
||||
+++ b/chrome/browser/ui/toolbar/toolbar_pref_names.cc
|
||||
@@ -16,14 +16,7 @@ namespace toolbar {
|
||||
|
||||
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
base::Value::List default_pinned_actions;
|
||||
- const std::optional<std::string>& chrome_labs_action =
|
||||
- actions::ActionIdMap::ActionIdToString(kActionShowChromeLabs);
|
||||
- // ActionIdToStringMappings are not initialized in unit tests, therefore will
|
||||
- // not have a value. In the normal case, the action should always have a
|
||||
- // value.
|
||||
- if (chrome_labs_action.has_value()) {
|
||||
- default_pinned_actions.Append(chrome_labs_action.value());
|
||||
- }
|
||||
+ // Chrome Labs is no longer pinned by default
|
||||
|
||||
if (features::HasTabSearchToolbarButton()) {
|
||||
const std::optional<std::string>& tab_search_action =
|
||||
--
|
||||
2.49.0
|
||||
|
||||
104
patches/nxtscape/pin-views-old-profiles-fix.patch
Normal file
104
patches/nxtscape/pin-views-old-profiles-fix.patch
Normal file
@@ -0,0 +1,104 @@
|
||||
From f07b80002fb490f96728c9cdda67e083ba983c90 Mon Sep 17 00:00:00 2001
|
||||
From: Nikhil Sonti <nikhilsv92@gmail.com>
|
||||
Date: Fri, 11 Jul 2025 13:04:34 -0700
|
||||
Subject: [PATCH] pin clashofgpt and third party on old profiles too
|
||||
|
||||
---
|
||||
.../sync/prefs/chrome_syncable_prefs_database.cc | 10 ++++++++++
|
||||
.../pinned_toolbar/pinned_toolbar_actions_model.cc | 14 ++++++++++++++
|
||||
chrome/browser/ui/toolbar/toolbar_pref_names.cc | 6 ++++++
|
||||
chrome/browser/ui/toolbar/toolbar_pref_names.h | 8 ++++++++
|
||||
4 files changed, 38 insertions(+)
|
||||
|
||||
diff --git a/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc b/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc
|
||||
index 26f4aed48a900..946b7292a78e8 100644
|
||||
--- a/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc
|
||||
+++ b/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc
|
||||
@@ -394,6 +394,8 @@ enum {
|
||||
kPinSplitTabButton = 100327,
|
||||
kGlicRolloutEligibility = 100328,
|
||||
kShelfNotebookLmAppPinRolls = 100329,
|
||||
+ kPinnedThirdPartyLlmMigrationComplete = 100330,
|
||||
+ kPinnedClashOfGptsMigrationComplete = 100331,
|
||||
// See components/sync_preferences/README.md about adding new entries here.
|
||||
// vvvvv IMPORTANT! vvvvv
|
||||
// Note to the reviewer: IT IS YOUR RESPONSIBILITY to ensure that new syncable
|
||||
@@ -574,6 +576,14 @@ constexpr auto kChromeSyncablePrefsAllowlist = base::MakeFixedFlatMap<
|
||||
{syncable_prefs_ids::kTabSearchMigrationComplete, syncer::PREFERENCES,
|
||||
sync_preferences::PrefSensitivity::kNone,
|
||||
sync_preferences::MergeBehavior::kNone}},
|
||||
+ {prefs::kPinnedThirdPartyLlmMigrationComplete,
|
||||
+ {syncable_prefs_ids::kPinnedThirdPartyLlmMigrationComplete, syncer::PREFERENCES,
|
||||
+ sync_preferences::PrefSensitivity::kNone,
|
||||
+ sync_preferences::MergeBehavior::kNone}},
|
||||
+ {prefs::kPinnedClashOfGptsMigrationComplete,
|
||||
+ {syncable_prefs_ids::kPinnedClashOfGptsMigrationComplete, syncer::PREFERENCES,
|
||||
+ sync_preferences::PrefSensitivity::kNone,
|
||||
+ sync_preferences::MergeBehavior::kNone}},
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
{extensions::pref_names::kPinnedExtensions,
|
||||
diff --git a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
|
||||
index 613d124be1752..3fd0ec6cd8da1 100644
|
||||
--- a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
|
||||
+++ b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
|
||||
@@ -252,6 +252,20 @@ void PinnedToolbarActionsModel::MaybeMigrateExistingPinnedStates() {
|
||||
UpdatePinnedState(kActionRouteMedia, previously_pinned);
|
||||
pref_service_->SetBoolean(prefs::kPinnedCastMigrationComplete, true);
|
||||
}
|
||||
+
|
||||
+ // Migrate Third Party LLM panel to pinned state for existing profiles
|
||||
+ if (base::FeatureList::IsEnabled(features::kThirdPartyLlmPanel) &&
|
||||
+ !pref_service_->GetBoolean(prefs::kPinnedThirdPartyLlmMigrationComplete)) {
|
||||
+ UpdatePinnedState(kActionSidePanelShowThirdPartyLlm, true);
|
||||
+ pref_service_->SetBoolean(prefs::kPinnedThirdPartyLlmMigrationComplete, true);
|
||||
+ }
|
||||
+
|
||||
+ // Migrate Clash of GPTs to pinned state for existing profiles
|
||||
+ if (base::FeatureList::IsEnabled(features::kClashOfGpts) &&
|
||||
+ !pref_service_->GetBoolean(prefs::kPinnedClashOfGptsMigrationComplete)) {
|
||||
+ UpdatePinnedState(kActionSidePanelShowClashOfGpts, true);
|
||||
+ pref_service_->SetBoolean(prefs::kPinnedClashOfGptsMigrationComplete, true);
|
||||
+ }
|
||||
}
|
||||
|
||||
const std::vector<actions::ActionId>&
|
||||
diff --git a/chrome/browser/ui/toolbar/toolbar_pref_names.cc b/chrome/browser/ui/toolbar/toolbar_pref_names.cc
|
||||
index 98c8216772c6f..343376dd051fb 100644
|
||||
--- a/chrome/browser/ui/toolbar/toolbar_pref_names.cc
|
||||
+++ b/chrome/browser/ui/toolbar/toolbar_pref_names.cc
|
||||
@@ -66,6 +66,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kTabSearchMigrationComplete, false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
+ registry->RegisterBooleanPref(
|
||||
+ prefs::kPinnedThirdPartyLlmMigrationComplete, false,
|
||||
+ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
+ registry->RegisterBooleanPref(
|
||||
+ prefs::kPinnedClashOfGptsMigrationComplete, false,
|
||||
+ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
}
|
||||
|
||||
} // namespace toolbar
|
||||
diff --git a/chrome/browser/ui/toolbar/toolbar_pref_names.h b/chrome/browser/ui/toolbar/toolbar_pref_names.h
|
||||
index c59d5f14f663d..91c60de160f9e 100644
|
||||
--- a/chrome/browser/ui/toolbar/toolbar_pref_names.h
|
||||
+++ b/chrome/browser/ui/toolbar/toolbar_pref_names.h
|
||||
@@ -33,6 +33,14 @@ inline constexpr char kPinnedCastMigrationComplete[] =
|
||||
inline constexpr char kTabSearchMigrationComplete[] =
|
||||
"toolbar.tab_search_migration_complete";
|
||||
|
||||
+// Indicates whether Third Party LLM has been migrated to the new toolbar container.
|
||||
+inline constexpr char kPinnedThirdPartyLlmMigrationComplete[] =
|
||||
+ "toolbar.pinned_third_party_llm_migration_complete";
|
||||
+
|
||||
+// Indicates whether Clash of GPTs has been migrated to the new toolbar container.
|
||||
+inline constexpr char kPinnedClashOfGptsMigrationComplete[] =
|
||||
+ "toolbar.pinned_clash_of_gpts_migration_complete";
|
||||
+
|
||||
} // namespace prefs
|
||||
|
||||
namespace toolbar {
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@@ -8,6 +8,7 @@ nxtscape/nxtscape-settings-ui.patch
|
||||
nxtscape/disable-user-gesture-restriction-on-sidepanel.patch
|
||||
nxtscape/disable-info-bar-in-cdp.patch
|
||||
nxtscape/disable-google-key-info-bar.patch
|
||||
nxtscape/disable-chrome-labs-pinning.patch
|
||||
|
||||
# agents
|
||||
nxtscape/ai-chat-extension.patch
|
||||
@@ -24,3 +25,4 @@ nxtscape/embed-third-party-llm-in-side-panel.patch
|
||||
nxtscape/pin-nxtscape-agents-together.patch
|
||||
nxtscape/clash-of-gpts.patch
|
||||
nxtscape/update-color-pinned-views.patch
|
||||
nxtscape/pin-views-old-profiles-fix.patch
|
||||
|
||||
Reference in New Issue
Block a user