From f6e8b8950fd7835be3b1dc8896e6fc0c638d3074 Mon Sep 17 00:00:00 2001 From: Rootkit404 <175176948+RKNF404@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:16:46 -0400 Subject: [PATCH 1/5] Remove references to unused prefs --- patches/remove-unused-preferences.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/patches/remove-unused-preferences.patch b/patches/remove-unused-preferences.patch index 12e6cf49..db56e000 100644 --- a/patches/remove-unused-preferences.patch +++ b/patches/remove-unused-preferences.patch @@ -1,3 +1,25 @@ +diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp +index f318a33f56053..b5cca497db8b7 100644 +--- a/chrome/app/settings_strings.grdp ++++ b/chrome/app/settings_strings.grdp +@@ -2307,7 +2307,7 @@ + Security + + +- Safe Browsing (protection from dangerous sites) and other security settings ++ DNS, certificate management, and other security settings + + +@@ -3902,7 +3902,7 @@ + + + +- You and Google ++ Your Profile + + + Google Profile photo diff --git a/chrome/browser/resources/settings/basic_page/basic_page.ts b/chrome/browser/resources/settings/basic_page/basic_page.ts index 1024f4f8206f6..a3f1a384030c2 100644 --- a/chrome/browser/resources/settings/basic_page/basic_page.ts From 658c8c77a4c2779509d38d58ca4b8bf688b63cc0 Mon Sep 17 00:00:00 2001 From: Rootkit404 <175176948+RKNF404@users.noreply.github.com> Date: Tue, 3 Sep 2024 21:43:11 -0400 Subject: [PATCH 2/5] Change method of modifying HTML text --- patches/remove-unused-preferences.patch | 48 +++++++++++++------------ 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/patches/remove-unused-preferences.patch b/patches/remove-unused-preferences.patch index db56e000..e4cba82f 100644 --- a/patches/remove-unused-preferences.patch +++ b/patches/remove-unused-preferences.patch @@ -1,25 +1,16 @@ -diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp -index f318a33f56053..b5cca497db8b7 100644 ---- a/chrome/app/settings_strings.grdp -+++ b/chrome/app/settings_strings.grdp -@@ -2307,7 +2307,7 @@ - Security - - -- Safe Browsing (protection from dangerous sites) and other security settings -+ DNS, certificate management, and other security settings - - -@@ -3902,7 +3902,7 @@ - - - -- You and Google -+ Your Profile - - - Google Profile photo +diff --git a/chrome/browser/resources/settings/basic_page/basic_page.html b/chrome/browser/resources/settings/basic_page/basic_page.html +index f44cde44ed34f..fd29b80af8ba4 100644 +--- a/chrome/browser/resources/settings/basic_page/basic_page.html ++++ b/chrome/browser/resources/settings/basic_page/basic_page.html +@@ -17,7 +17,7 @@ + + + +- + diff --git a/chrome/browser/resources/settings/basic_page/basic_page.ts b/chrome/browser/resources/settings/basic_page/basic_page.ts index 1024f4f8206f6..a3f1a384030c2 100644 --- a/chrome/browser/resources/settings/basic_page/basic_page.ts @@ -51,6 +42,19 @@ index 6297480d4f357..16514e7c58c5e 100644 +diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html +index af9ea12b78f9f..a1374bf969eae 100644 +--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html ++++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html +@@ -86,7 +86,7 @@ + + + Date: Wed, 4 Sep 2024 23:58:10 -0400 Subject: [PATCH 3/5] Fix replacement gap, retitle security sub-menu --- patches/remove-unused-preferences.patch | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/patches/remove-unused-preferences.patch b/patches/remove-unused-preferences.patch index e4cba82f..5ba42911 100644 --- a/patches/remove-unused-preferences.patch +++ b/patches/remove-unused-preferences.patch @@ -70,10 +70,10 @@ index 00318322c8147..b89acab52a96a 100644 // Only show Manage Topics page when PTB is enabled. If user is part of Mode B diff --git a/chrome/browser/resources/settings/privacy_page/security_page.html b/chrome/browser/resources/settings/privacy_page/security_page.html -index 8fd4f50e2d484..39db730a58b76 100644 +index 8fd4f50e2d484..b67f49bfc39b1 100644 --- a/chrome/browser/resources/settings/privacy_page/security_page.html +++ b/chrome/browser/resources/settings/privacy_page/security_page.html -@@ -64,201 +64,6 @@ +@@ -64,203 +64,8 @@ pointer-events: auto; } @@ -273,8 +273,11 @@ index 8fd4f50e2d484..39db730a58b76 100644 - - - $i18n{advancedPageTitle} +- $i18n{advancedPageTitle} ++ Security + + @@ -309,6 +312,19 @@ index 8fc6a6ae3a42a..df9ee0d5ccc19 100644 // Initialize the last focus time on page load. this.lastFocusTime_ = HatsBrowserProxyImpl.getInstance().now(); } +diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.html b/chrome/browser/resources/settings/settings_menu/settings_menu.html +index 658110a4a8775..6863ef1a0ab60 100644 +--- a/chrome/browser/resources/settings/settings_menu/settings_menu.html ++++ b/chrome/browser/resources/settings/settings_menu/settings_menu.html +@@ -54,7 +54,7 @@ + + + +- $i18n{peoplePageTitle} ++ Your Profile + + + Date: Sun, 8 Sep 2024 21:47:39 -0400 Subject: [PATCH 4/5] Update string changes to support localization --- patches/remove-unused-preferences.patch | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/patches/remove-unused-preferences.patch b/patches/remove-unused-preferences.patch index 5ba42911..f7ca9dc1 100644 --- a/patches/remove-unused-preferences.patch +++ b/patches/remove-unused-preferences.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/basic_page/basic_page.html b/chrome/browser/resources/settings/basic_page/basic_page.html -index f44cde44ed34f..fd29b80af8ba4 100644 +index f44cde44ed34f..361492b4390c7 100644 --- a/chrome/browser/resources/settings/basic_page/basic_page.html +++ b/chrome/browser/resources/settings/basic_page/basic_page.html @@ -17,7 +17,7 @@ @@ -7,7 +7,7 @@ index f44cde44ed34f..fd29b80af8ba4 100644 - @@ -43,7 +43,7 @@ index 6297480d4f357..16514e7c58c5e 100644 diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html -index af9ea12b78f9f..a1374bf969eae 100644 +index af9ea12b78f9f..c197d054668d7 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html @@ -86,7 +86,7 @@ @@ -51,7 +51,7 @@ index af9ea12b78f9f..a1374bf969eae 100644 @@ -272,13 +272,13 @@ index 8fd4f50e2d484..b67f49bfc39b1 100644 - - - - +- - $i18n{advancedPageTitle} -+ Security - +- @@ -313,7 +313,7 @@ index 8fc6a6ae3a42a..df9ee0d5ccc19 100644 this.lastFocusTime_ = HatsBrowserProxyImpl.getInstance().now(); } diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.html b/chrome/browser/resources/settings/settings_menu/settings_menu.html -index 658110a4a8775..6863ef1a0ab60 100644 +index 658110a4a8775..0025ddee63361 100644 --- a/chrome/browser/resources/settings/settings_menu/settings_menu.html +++ b/chrome/browser/resources/settings/settings_menu/settings_menu.html @@ -54,7 +54,7 @@ @@ -321,7 +321,7 @@ index 658110a4a8775..6863ef1a0ab60 100644 - $i18n{peoplePageTitle} -+ Your Profile ++ $i18n{profileInformationTitle} Date: Wed, 11 Sep 2024 09:22:46 -0400 Subject: [PATCH 5/5] Fix crashes related to used strings --- patches/remove-unused-preferences.patch | 33 ++++++++++++++++--------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/patches/remove-unused-preferences.patch b/patches/remove-unused-preferences.patch index f7ca9dc1..0b6bb073 100644 --- a/patches/remove-unused-preferences.patch +++ b/patches/remove-unused-preferences.patch @@ -7,7 +7,7 @@ index f44cde44ed34f..361492b4390c7 100644 - @@ -43,18 +43,29 @@ index 6297480d4f357..16514e7c58c5e 100644 diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html -index af9ea12b78f9f..c197d054668d7 100644 +index af9ea12b78f9f..139c5ce048135 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html -@@ -86,7 +86,7 @@ +@@ -85,8 +85,8 @@ + + + +- + @@ -272,13 +283,13 @@ index 8fd4f50e2d484..21efc5e3a7942 100644 - - - -- + - $i18n{advancedPageTitle} -- ++ $i18n{securityPageTitle} + @@ -321,7 +332,7 @@ index 658110a4a8775..0025ddee63361 100644 - $i18n{peoplePageTitle} -+ $i18n{profileInformationTitle} ++ $i18n{editPerson}