Update patch for 121.0.6167.85

i8ce
Arkady L. Shane 11 months ago
parent 36897eba3b
commit ea6895267b
Signed by: tigro
GPG Key ID: 1EC08A25C9DB2503

@ -1,6 +1,6 @@
From e1462e35be07ce56385a274ca4f81812417dcce6 Mon Sep 17 00:00:00 2001
From: Alexey Berezhok <aberezhok@msvsphere-os.ru>
Date: Tue, 5 Dec 2023 21:46:29 +0300
From cd262ed6e5143fde90e0f03d782815f87ad9d168 Mon Sep 17 00:00:00 2001
From: tigro <tigro@msvsphere-os.ru>
Date: Wed, 24 Jan 2024 13:28:09 +0300
Subject: [PATCH] Added Yandex search bar as default on newtab and new-tab-page
---
@ -28,10 +28,10 @@ Subject: [PATCH] Added Yandex search bar as default on newtab and new-tab-page
21 files changed, 117 insertions(+), 36 deletions(-)
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 0b10daa9ce..3c794026c7 100644
index ef461fb3ce..838886d275 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -7370,13 +7370,10 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -7514,13 +7514,10 @@ Keep your key file in a safe place. You will need it to create new versions of y
<!-- NTP -->
<message name="IDS_GOOGLE_SEARCH_BOX_EMPTY_HINT" desc="The text displayed in the fakebox (on the New Tab page) when it is empty, and Google is the default search engine.">
@ -46,10 +46,10 @@ index 0b10daa9ce..3c794026c7 100644
<message name="IDS_NTP_CUSTOM_LINKS_ADD_SHORTCUT_TOOLTIP" desc="The tooltip for adding a custom link shortcut. (On the New Tab Page)">
Add shortcut
diff --git a/chrome/app/resources/generated_resources_be.xtb b/chrome/app/resources/generated_resources_be.xtb
index fec3374f62..643daad979 100644
index 9e28f256f0..4c05572d7e 100644
--- a/chrome/app/resources/generated_resources_be.xtb
+++ b/chrome/app/resources/generated_resources_be.xtb
@@ -8766,7 +8766,7 @@
@@ -8979,7 +8979,7 @@
<translation id="8048728378294435881">Стварайце рэзервовыя копіі сваіх даных, каб іх можна было выкарыстоўваць на іншых прыладах</translation>
<translation id="8048977114738515028">Стварыце ярлык на працоўным стале прылады, каб мець прамы доступ да гэтага профілю</translation>
<translation id="8049029041626250638">Падключыце клавіятуру або мыш. Калі вы выкарыстоўваеце прылады з Bluetooth, упэўніцеся, што яны гатовыя да спалучэння.</translation>
@ -59,10 +59,10 @@ index fec3374f62..643daad979 100644
<translation id="8049948037269924837">Адваротная прагортка сэнсарнай панэллю</translation>
<translation id="8050038245906040378">Камерцыйнае падпісванне кода ў Microsoft</translation>
diff --git a/chrome/app/resources/generated_resources_en-GB.xtb b/chrome/app/resources/generated_resources_en-GB.xtb
index 7605601a0b..ae095dca6d 100644
index 400a5d3cd6..01925039b9 100644
--- a/chrome/app/resources/generated_resources_en-GB.xtb
+++ b/chrome/app/resources/generated_resources_en-GB.xtb
@@ -8779,7 +8779,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -8994,7 +8994,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
<translation id="8048728378294435881">Back up your stuff and use it on any device</translation>
<translation id="8048977114738515028">Create a desktop shortcut on your device to access directly to this profile</translation>
<translation id="8049029041626250638">Connect a keyboard or mouse. If you are using Bluetooth devices, make sure that your devices are ready to pair.</translation>
@ -72,10 +72,10 @@ index 7605601a0b..ae095dca6d 100644
<translation id="8049948037269924837">Touchpad reverse scrolling</translation>
<translation id="8050038245906040378">Microsoft Commercial Code Signing</translation>
diff --git a/chrome/app/resources/generated_resources_ru.xtb b/chrome/app/resources/generated_resources_ru.xtb
index a4c91939c8..e4083a4b44 100644
index 5a326f9534..6bdd77f1fc 100644
--- a/chrome/app/resources/generated_resources_ru.xtb
+++ b/chrome/app/resources/generated_resources_ru.xtb
@@ -8770,7 +8770,7 @@
@@ -8985,7 +8985,7 @@
<translation id="8048728378294435881">Создайте резервную копию данных и используйте их на любом устройстве.</translation>
<translation id="8048977114738515028">Чтобы быстро переключаться на этот профиль, создайте ярлык на рабочем столе</translation>
<translation id="8049029041626250638">Подключите мышь или клавиатуру. Если вы используете устройства Bluetooth, убедитесь, что они готовы к подключению.</translation>
@ -85,10 +85,10 @@ index a4c91939c8..e4083a4b44 100644
<translation id="8049948037269924837">Обратное направление прокрутки с помощью сенсорной панели</translation>
<translation id="8050038245906040378">Подписывание коммерческого кода Microsoft</translation>
diff --git a/chrome/app/resources/generated_resources_uk.xtb b/chrome/app/resources/generated_resources_uk.xtb
index db17abebfc..8c3bdccd64 100644
index ecc3988cce..8e6e574e6f 100644
--- a/chrome/app/resources/generated_resources_uk.xtb
+++ b/chrome/app/resources/generated_resources_uk.xtb
@@ -8784,7 +8784,7 @@
@@ -8999,7 +8999,7 @@
<translation id="8048728378294435881">Створюйте резервні копії даних і використовуйте їх на будь-якому пристрої</translation>
<translation id="8048977114738515028">Створити ярлик на робочому столі, щоб відразу переходити до цього профілю</translation>
<translation id="8049029041626250638">Підключіть клавіатуру або мишу. Якщо ви користуєтеся пристроями з Bluetooth, переконайтеся, що вони готові до підключення.</translation>
@ -266,7 +266,7 @@ index f1bf028553..1bc12e7588 100644
:host(:not([single-colored])) #logo {
diff --git a/chrome/browser/resources/new_tab_page/logo.ts b/chrome/browser/resources/new_tab_page/logo.ts
index d62ba160bb..d9a5ec68c9 100644
index 20a2a2aa1e..eab610aef8 100644
--- a/chrome/browser/resources/new_tab_page/logo.ts
+++ b/chrome/browser/resources/new_tab_page/logo.ts
@@ -256,7 +256,7 @@ export class LogoElement extends PolymerElement {
@ -295,19 +295,19 @@ index a3114401e1..78fc32dadc 100644
--cr-realbox-height: 44px;
--cr-realbox-min-width: var(--ntp-search-box-width);
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 369bea0388..244d4eb8b4 100644
index 3e0db181ac..0843b2ef36 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -173,6 +173,8 @@ struct NewTabURLDetails {
@@ -179,6 +179,8 @@ struct NewTabURLDetails {
#if BUILDFLAG(IS_ANDROID)
const GURL local_url;
+#elif 1 // Always use built-in NTp page
+ const GURL local_url(chrome::kChromeUINewTabPageURL);
+ #elif 1 // Always use built-in NTp page
+ const GURL local_url(chrome::kChromeUINewTabPageURL);
#else
const bool default_is_google = DefaultSearchProviderIsGoogle(profile);
const GURL local_url(default_is_google
@@ -232,6 +234,11 @@ bool DefaultSearchProviderIsGoogle(Profile* profile) {
@@ -245,6 +247,11 @@ bool DefaultSearchProviderIsGoogle(Profile* profile) {
TemplateURLServiceFactory::GetForProfile(profile));
}
@ -317,7 +317,7 @@ index 369bea0388..244d4eb8b4 100644
+}
+
bool IsNTPOrRelatedURL(const GURL& url, Profile* profile) {
if (!url.is_valid())
if (!url.is_valid()) {
return false;
diff --git a/chrome/browser/search/search.h b/chrome/browser/search/search.h
index c7ae65114f..5859d72731 100644
@ -333,10 +333,10 @@ index c7ae65114f..5859d72731 100644
bool IsNTPOrRelatedURL(const GURL& url, Profile* profile);
diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
index 6595983de6..8a2318b8ad 100644
index d9b6c3500f..a2b1bfb9df 100644
--- a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
+++ b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
@@ -34,6 +34,7 @@
@@ -36,6 +36,7 @@
#include "chrome/browser/search/background/ntp_custom_background_service_factory.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/search_provider_logos/logo_service_factory.h"
@ -344,7 +344,7 @@ index 6595983de6..8a2318b8ad 100644
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/sync/sync_service_factory.h"
#include "chrome/browser/themes/theme_service_factory.h"
@@ -608,6 +609,10 @@ content::WebUIDataSource* CreateAndAddNewTabPageUiHtmlSource(Profile* profile) {
@@ -621,6 +622,10 @@ content::WebUIDataSource* CreateAndAddNewTabPageUiHtmlSource(Profile* profile) {
source->AddBoolean("historyClustersModuleDiscountsEnabled",
base::FeatureList::IsEnabled(
ntp_features::kNtpHistoryClustersModuleDiscounts));
@ -397,10 +397,10 @@ index 98572faa77..cfb6727848 100644
#endif // COMPONENTS_SEARCH_SEARCH_H_
diff --git a/components/search_engines/keyword_table.cc b/components/search_engines/keyword_table.cc
index ad6afc9ee4..d28ac27862 100644
index 5e616ec8b2..f0ffa97e6b 100644
--- a/components/search_engines/keyword_table.cc
+++ b/components/search_engines/keyword_table.cc
@@ -166,7 +166,9 @@ void BindURLToStatement(const TemplateURLData& data,
@@ -170,7 +170,9 @@ void BindURLToStatement(const TemplateURLData& data,
s->BindString(starting_column + 16, data.search_url_post_params);
s->BindString(starting_column + 17, data.suggestions_url_post_params);
s->BindString(starting_column + 18, data.image_url_post_params);
@ -410,7 +410,7 @@ index ad6afc9ee4..d28ac27862 100644
s->BindTime(starting_column + 20, data.last_visited);
s->BindBool(starting_column + 21, data.created_from_play_api);
s->BindInt(starting_column + 22, static_cast<int>(data.is_active));
@@ -508,7 +510,9 @@ bool KeywordTable::GetKeywordDataFromStatement(sql::Statement& s,
@@ -521,7 +523,9 @@ bool KeywordTable::GetKeywordDataFromStatement(sql::Statement& s,
data->SetURL(s.ColumnString(4));
data->suggestions_url = s.ColumnString(10);
data->image_url = s.ColumnString(16);
@ -421,7 +421,7 @@ index ad6afc9ee4..d28ac27862 100644
data->suggestions_url_post_params = s.ColumnString(18);
data->image_url_post_params = s.ColumnString(19);
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
index 8ab6a40d2e..844fd0ce19 100644
index 9f4e01c1bf..4574d793d2 100644
--- a/components/search_engines/prepopulated_engines.json
+++ b/components/search_engines/prepopulated_engines.json
@@ -639,7 +639,7 @@
@ -503,7 +503,7 @@ index 8ab6a40d2e..844fd0ce19 100644
"id": 15
},
diff --git a/components/search_engines/template_url_data_util.cc b/components/search_engines/template_url_data_util.cc
index 82d054944a..13d2aa704e 100644
index f81d966533..6188b52c47 100644
--- a/components/search_engines/template_url_data_util.cc
+++ b/components/search_engines/template_url_data_util.cc
@@ -71,10 +71,12 @@ std::unique_ptr<TemplateURLData> TemplateURLDataFromDictionary(
@ -519,7 +519,7 @@ index 82d054944a..13d2aa704e 100644
string_value = dict.FindString(DefaultSearchManager::kContextualSearchURL);
if (string_value) {
result->contextual_search_url = *string_value;
@@ -338,7 +340,7 @@ std::unique_ptr<TemplateURLData> TemplateURLDataFromPrepopulatedEngine(
@@ -344,7 +346,7 @@ std::unique_ptr<TemplateURLData> TemplateURLDataFromPrepopulatedEngine(
ToStringPiece(engine.search_url), ToStringPiece(engine.suggest_url),
ToStringPiece(engine.image_url),
ToStringPiece(engine.image_translate_url),
@ -528,7 +528,7 @@ index 82d054944a..13d2aa704e 100644
ToStringPiece(engine.contextual_search_url),
ToStringPiece(engine.logo_url), ToStringPiece(engine.doodle_url),
ToStringPiece(engine.search_url_post_params),
@@ -429,10 +431,12 @@ std::unique_ptr<TemplateURLData> TemplateURLDataFromOverrideDictionary(
@@ -435,10 +437,12 @@ std::unique_ptr<TemplateURLData> TemplateURLDataFromOverrideDictionary(
if (string_value) {
image_translate_url = *string_value;
}
@ -542,10 +542,10 @@ index 82d054944a..13d2aa704e 100644
if (string_value) {
contextual_search_url = *string_value;
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
index 492a908ed6..3f53afda71 100644
index 05845f86a6..e7473c1850 100644
--- a/components/search_engines/template_url_prepopulate_data.cc
+++ b/components/search_engines/template_url_prepopulate_data.cc
@@ -56,6 +56,7 @@ struct EngineAndTier {
@@ -61,6 +61,7 @@ struct EngineAndTier {
// Default (for countries with no better engine set)
constexpr EngineAndTier engines_default[] = {
@ -553,7 +553,7 @@ index 492a908ed6..3f53afda71 100644
{SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &yahoo},
@@ -209,8 +210,8 @@ constexpr EngineAndTier engines_BR[] = {
@@ -214,8 +215,8 @@ constexpr EngineAndTier engines_BR[] = {
// Belarus
constexpr EngineAndTier engines_BY[] = {
@ -563,7 +563,7 @@ index 492a908ed6..3f53afda71 100644
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &duckduckgo},
{SearchEngineTier::kTopEngines, &mail_ru},
@@ -597,9 +598,9 @@ constexpr EngineAndTier engines_IN[] = {
@@ -602,9 +603,9 @@ constexpr EngineAndTier engines_IN[] = {
// Iraq
constexpr EngineAndTier engines_IQ[] = {
@ -574,7 +574,7 @@ index 492a908ed6..3f53afda71 100644
{SearchEngineTier::kTopEngines, &yahoo},
{SearchEngineTier::kTopEngines, &duckduckgo},
};
@@ -702,8 +703,8 @@ constexpr EngineAndTier engines_KW[] = {
@@ -707,8 +708,8 @@ constexpr EngineAndTier engines_KW[] = {
// Kazakhstan
constexpr EngineAndTier engines_KZ[] = {
@ -584,7 +584,7 @@ index 492a908ed6..3f53afda71 100644
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &mail_ru},
{SearchEngineTier::kTopEngines, &yahoo},
@@ -1172,8 +1173,8 @@ constexpr EngineAndTier engines_TN[] = {
@@ -1177,8 +1178,8 @@ constexpr EngineAndTier engines_TN[] = {
// Turkey
constexpr EngineAndTier engines_TR[] = {
@ -594,7 +594,7 @@ index 492a908ed6..3f53afda71 100644
{SearchEngineTier::kTopEngines, &yahoo_tr},
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &duckduckgo},
@@ -1680,6 +1681,12 @@ GetPrepopulatedEnginesForEeaRegionCountries(int country_id,
@@ -1692,6 +1693,12 @@ GetPrepopulatedEnginesForEeaRegionCountries(int country_id,
current_number_of_engines++;
}
@ -607,7 +607,7 @@ index 492a908ed6..3f53afda71 100644
return t_urls;
}
@@ -1774,12 +1781,23 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
@@ -1818,12 +1825,23 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
}
}
}
@ -633,5 +633,5 @@ index 492a908ed6..3f53afda71 100644
}
--
2.39.3
2.43.0

Loading…
Cancel
Save