diff --git a/SOURCES/0001-Added-Yandex-search-bar-as-default-on-newtab-and-new.patch b/SOURCES/0001-Added-Yandex-search-bar-as-default-on-newtab-and-new.patch index de5ccdc5..f471471a 100644 --- a/SOURCES/0001-Added-Yandex-search-bar-as-default-on-newtab-and-new.patch +++ b/SOURCES/0001-Added-Yandex-search-bar-as-default-on-newtab-and-new.patch @@ -1,32 +1,32 @@ -From 68d8154734023ebc37fb4b87ab7a7fd6d2815bd2 Mon Sep 17 00:00:00 2001 -From: Sergey Cherevko -Date: Fri, 14 Jun 2024 18:36:08 +0300 +From f823aa91e0a714774a2ca18ccb402078c7336929 Mon Sep 17 00:00:00 2001 +From: tigro +Date: Sun, 16 Jun 2024 15:49:58 +0300 Subject: [PATCH] Added Yandex search bar as default on newtab and new-tab-page --- chrome/app/generated_resources.grd | 2 -- - .../app/resources/generated_resources_be.xtb | 4 ++-- - .../resources/generated_resources_en-GB.xtb | 4 ++-- - .../app/resources/generated_resources_ru.xtb | 4 ++-- - .../app/resources/generated_resources_uk.xtb | 4 ++-- + .../app/resources/generated_resources_be.xtb | 2 +- + .../resources/generated_resources_en-GB.xtb | 2 +- + .../app/resources/generated_resources_ru.xtb | 2 +- + .../app/resources/generated_resources_uk.xtb | 2 +- chrome/browser/history/top_sites_factory.cc | 4 ++-- .../resources/new_tab_page/lens_form.html | 1 + - .../resources/new_tab_page/lens_form.ts | 20 ++++++++++++++++++- + .../resources/new_tab_page/lens_form.ts | 19 ++++++++++++++++++- .../new_tab_page/lens_upload_dialog.html | 10 +++++----- .../browser/resources/new_tab_page/logo.html | 5 +---- chrome/browser/resources/new_tab_page/logo.ts | 2 +- chrome/browser/search/search.cc | 7 +++++++ chrome/browser/search/search.h | 2 ++ .../ui/webui/new_tab_page/new_tab_page_ui.cc | 5 +++++ - components/search/search.cc | 14 +++++++++++++ + components/search/search.cc | 14 ++++++++++++++ components/search/search.h | 7 +++++++ components/search_engines/keyword_table.cc | 4 ++++ - .../search_engines/prepopulated_engines.json | 11 +++++----- - .../search_engine_countries-inc.cc | 11 +++++----- + .../search_engines/prepopulated_engines.json | 11 ++++++----- + .../search_engine_countries-inc.cc | 9 +++++---- .../search_engines/template_url_data_util.cc | 6 +++++- - .../template_url_prepopulate_data.cc | 15 ++++++++------ + .../template_url_prepopulate_data.cc | 15 +++++++++------ .../cr_components/searchbox/realbox.html | 7 +++++++ - 22 files changed, 109 insertions(+), 40 deletions(-) + 22 files changed, 103 insertions(+), 35 deletions(-) diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index b54ec8a465..4043570c4b 100644 @@ -44,7 +44,7 @@ index b54ec8a465..4043570c4b 100644 Add to your search diff --git a/chrome/app/resources/generated_resources_be.xtb b/chrome/app/resources/generated_resources_be.xtb -index e6f66c5fdd..15e1e75fdf 100644 +index e6f66c5fdd..f1d9597fef 100644 --- a/chrome/app/resources/generated_resources_be.xtb +++ b/chrome/app/resources/generated_resources_be.xtb @@ -9407,7 +9407,7 @@ @@ -56,15 +56,8 @@ index e6f66c5fdd..15e1e75fdf 100644 У Google пашырэнне "" абазначана як шкоднае. Яго ўсталяванне было прадухілена Адваротная прагортка сэнсарнай панэллю Камерцыйнае падпісванне кода ў Microsoft -@@ -11112,4 +11112,4 @@ - Пры наведванні сайтаў яны будуць аўтаматычна ўлічваць гэту наладу. Звычайна сайты адпраўляюць апавяшчэнні, каб паведаміць вам пра экстранныя навіны або новыя паведамленні ў чаце. - Каб выкарыстоўваць функцыю сінхранізацыі параметраў Wi-Fi, уключыце Сінхранізацыю Chrome. Даведацца больш - Пра&верыць -- -\ No newline at end of file -+ diff --git a/chrome/app/resources/generated_resources_en-GB.xtb b/chrome/app/resources/generated_resources_en-GB.xtb -index 16706b18e5..f1393a6bf8 100644 +index 16706b18e5..bae533b582 100644 --- a/chrome/app/resources/generated_resources_en-GB.xtb +++ b/chrome/app/resources/generated_resources_en-GB.xtb @@ -9421,7 +9421,7 @@ Keep your key file in a safe place. You will need it to create new versions of y @@ -76,15 +69,8 @@ index 16706b18e5..f1393a6bf8 100644 Google has flagged '' as malicious, and installation has been prevented Touchpad reverse scrolling Microsoft Commercial Code Signing -@@ -11126,4 +11126,4 @@ Permissions that you've already given to websites and apps may apply to this acc - Sites automatically follow this setting when you visit them. Sites usually send notifications to let you know about breaking news or chat messages. - Turn on Chrome Sync to use Wi-Fi Sync. Learn more - I&nspect -- -\ No newline at end of file -+ diff --git a/chrome/app/resources/generated_resources_ru.xtb b/chrome/app/resources/generated_resources_ru.xtb -index a048aeac98..9363e6bc96 100644 +index a048aeac98..561eb8746d 100644 --- a/chrome/app/resources/generated_resources_ru.xtb +++ b/chrome/app/resources/generated_resources_ru.xtb @@ -9412,7 +9412,7 @@ @@ -96,15 +82,8 @@ index a048aeac98..9363e6bc96 100644 Google заблокировал установку потенциально опасной программы (). Обратное направление прокрутки с помощью сенсорной панели Подписывание коммерческого кода Microsoft -@@ -11120,4 +11120,4 @@ - Когда вы посещаете сайты, эти настройки используются автоматически. Обычно сайты показывают уведомления, чтобы оповестить вас о сообщениях в чате или срочных новостях. - Чтобы использовать функцию "Синхронизация Wi-Fi", включите синхронизацию Chrome. Подробнее… - П&росмотреть код -- -\ No newline at end of file -+ diff --git a/chrome/app/resources/generated_resources_uk.xtb b/chrome/app/resources/generated_resources_uk.xtb -index fa169a612c..751be07c7c 100644 +index fa169a612c..90305e3675 100644 --- a/chrome/app/resources/generated_resources_uk.xtb +++ b/chrome/app/resources/generated_resources_uk.xtb @@ -9426,7 +9426,7 @@ @@ -116,13 +95,6 @@ index fa169a612c..751be07c7c 100644 Система Google позначила розширення як шкідливе та заборонила встановлення Зворотне прокручування на сенсорній панелі Підписування комерційного коду Microsoft -@@ -11134,4 +11134,4 @@ - Коли ви відвідуєте сайти, вони автоматично дотримуються цього налаштування. Зазвичай сайти надсилають сповіщення, щоб інформувати про важливі новини або повідомлення в чаті. - Щоб користуватися синхронізацією Wi-Fi, потрібно ввімкнути Синхронізацію Chrome. Докладніше - Перевірити -- -\ No newline at end of file -+ diff --git a/chrome/browser/history/top_sites_factory.cc b/chrome/browser/history/top_sites_factory.cc index 8f20a76a66..d1a13e7046 100644 --- a/chrome/browser/history/top_sites_factory.cc @@ -158,16 +130,15 @@ index 57c6387c7e..0f31a59767 100644 diff --git a/chrome/browser/resources/new_tab_page/lens_form.ts b/chrome/browser/resources/new_tab_page/lens_form.ts -index bf24f4c495..53fd771d7d 100644 +index bf24f4c495..167b57bc5e 100644 --- a/chrome/browser/resources/new_tab_page/lens_form.ts +++ b/chrome/browser/resources/new_tab_page/lens_form.ts -@@ -12,11 +12,15 @@ import {getTemplate} from './lens_form.html.js'; +@@ -12,11 +12,14 @@ import {getTemplate} from './lens_form.html.js'; /** Lens service endpoint for the Upload by File action. */ const SCOTTY_UPLOAD_FILE_ACTION: string = 'https://lens.google.com/upload'; const DIRECT_UPLOAD_FILE_ACTION: string = 'https://lens.google.com/v3/upload'; +const SCOTTY_UPLOAD_FILE_ACTION_YA: string = 'https://yandex.ru/images/search'; +const DIRECT_UPLOAD_FILE_ACTION_YA: string = 'https://yandex.ru/images/search'; -+ /** Entrypoint for the upload by file action. */ const UPLOAD_FILE_ENTRYPOINT: string = 'cntpubb'; @@ -177,7 +148,7 @@ index bf24f4c495..53fd771d7d 100644 const UPLOAD_BY_URL_ACTION: string = 'https://lens.google.com/uploadbyurl'; /** Entrypoint for the upload by url action. */ -@@ -74,6 +78,7 @@ export class LensFormElement extends PolymerElement { +@@ -74,6 +77,7 @@ export class LensFormElement extends PolymerElement { } static get properties() { @@ -185,7 +156,7 @@ index bf24f4c495..53fd771d7d 100644 return { supportedFileTypes_: { type: String, -@@ -99,7 +104,7 @@ export class LensFormElement extends PolymerElement { +@@ -99,7 +103,7 @@ export class LensFormElement extends PolymerElement { uploadUrlAction_: { type: String, readOnly: true, @@ -194,7 +165,7 @@ index bf24f4c495..53fd771d7d 100644 }, uploadUrl_: String, uploadUrlEntrypoint_: { -@@ -117,6 +122,11 @@ export class LensFormElement extends PolymerElement { +@@ -117,6 +121,11 @@ export class LensFormElement extends PolymerElement { readOnly: true, value: loadTimeData.getString('realboxLensVariations'), }, @@ -206,7 +177,7 @@ index bf24f4c495..53fd771d7d 100644 }; } -@@ -126,6 +136,7 @@ export class LensFormElement extends PolymerElement { +@@ -126,6 +135,7 @@ export class LensFormElement extends PolymerElement { private startTime_: string|null = null; private clientData_: string; private useDirectUpload_: boolean; @@ -214,7 +185,7 @@ index bf24f4c495..53fd771d7d 100644 openSystemFilePicker() { this.$.fileInput.click(); -@@ -153,6 +164,11 @@ export class LensFormElement extends PolymerElement { +@@ -153,6 +163,11 @@ export class LensFormElement extends PolymerElement { } private async submitFile_(file: File) { @@ -226,7 +197,7 @@ index bf24f4c495..53fd771d7d 100644 if (!SUPPORTED_FILE_TYPES.includes(file.type)) { this.dispatchError_(LensErrorType.FILE_TYPE); return; -@@ -194,8 +210,10 @@ export class LensFormElement extends PolymerElement { +@@ -194,8 +209,10 @@ export class LensFormElement extends PolymerElement { processedFile.imageWidth ? processedFile.imageWidth.toString() : ''); this.uploadFileAction_ = action.toString(); @@ -238,7 +209,7 @@ index bf24f4c495..53fd771d7d 100644 submitUrl(urlString: string) { diff --git a/chrome/browser/resources/new_tab_page/lens_upload_dialog.html b/chrome/browser/resources/new_tab_page/lens_upload_dialog.html -index a6eb910711..45ad51baa7 100644 +index a6eb910711..703311b280 100644 --- a/chrome/browser/resources/new_tab_page/lens_upload_dialog.html +++ b/chrome/browser/resources/new_tab_page/lens_upload_dialog.html @@ -99,7 +99,7 @@ @@ -264,7 +235,7 @@ index a6eb910711..45ad51baa7 100644 - -+ --> ++ //-->
-
+ ++
//-->
AddBoolean( + "googleLensForYandex", + search::DefaultSearchProviderIsYandex(profile)); + - source->AddBoolean( - "showCartInQuestModuleSetting", - IsCartModuleEnabled() && + SearchboxHandler::SetupWebUIDataSource( + source, profile, + /*enable_voice_search=*/true, diff --git a/components/search/search.cc b/components/search/search.cc index a7167fae92..67d36156c5 100644 --- a/components/search/search.cc @@ -489,7 +460,7 @@ index 91539be7a0..63b30e6c92 100644 "id": 15 }, diff --git a/components/search_engines/search_engine_countries-inc.cc b/components/search_engines/search_engine_countries-inc.cc -index 6c8ffb9e7d..4c99be8769 100644 +index 6c8ffb9e7d..417cb0009c 100644 --- a/components/search_engines/search_engine_countries-inc.cc +++ b/components/search_engines/search_engine_countries-inc.cc @@ -33,6 +33,7 @@ struct EngineAndTier { @@ -541,16 +512,6 @@ index 6c8ffb9e7d..4c99be8769 100644 {SearchEngineTier::kTopEngines, &yahoo_tr}, {SearchEngineTier::kTopEngines, &bing}, {SearchEngineTier::kTopEngines, &duckduckgo}, -@@ -1043,8 +1044,8 @@ constexpr EngineAndTier engines_TZ[] = { - - // Ukraine - constexpr EngineAndTier engines_UA[] = { -- {SearchEngineTier::kTopEngines, &google}, - {SearchEngineTier::kTopEngines, &yandex_ru}, -+ {SearchEngineTier::kTopEngines, &google}, - {SearchEngineTier::kTopEngines, &bing}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &yahoo}, diff --git a/components/search_engines/template_url_data_util.cc b/components/search_engines/template_url_data_util.cc index 6f85515188..7791bf8113 100644 --- a/components/search_engines/template_url_data_util.cc @@ -633,5 +594,5 @@ index 007ba1fafa..5fd20d191c 100644 /* Embedders should define --cr-realbox-min-width. */ --cr-realbox-shadow: 0 1px 6px 0 var(--color-realbox-shadow); -- -2.39.3 +2.45.1