mirror of
https://abf.rosa.ru/djam/chromium-browser-stable-test.git
synced 2025-02-24 10:02:47 +00:00
43 lines
2 KiB
Diff
43 lines
2 KiB
Diff
From 2cec94e5a9adb7532524d0d116bbdd39ffae250d Mon Sep 17 00:00:00 2001
|
|
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
|
|
Date: Thu, 26 May 2022 20:47:28 +0300
|
|
Subject: [PATCH 1/5] Functional new tab page with non-Google search engines
|
|
|
|
If e.g Yandex is chosen as a search engine, chrome://new-tab-page is replaced with chrome://new-tab-page-third-party
|
|
which does not allow to add new items. Use chrome://new-tab-page.
|
|
---
|
|
chrome/browser/search/search.cc | 4 +---
|
|
chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc | 2 +-
|
|
2 files changed, 2 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
|
|
index 369bea0388e1f..1ed9996cf36e1 100644
|
|
--- a/chrome/browser/search/search.cc
|
|
+++ b/chrome/browser/search/search.cc
|
|
@@ -175,9 +175,7 @@ struct NewTabURLDetails {
|
|
const GURL local_url;
|
|
#else
|
|
const bool default_is_google = DefaultSearchProviderIsGoogle(profile);
|
|
- const GURL local_url(default_is_google
|
|
- ? chrome::kChromeUINewTabPageURL
|
|
- : chrome::kChromeUINewTabPageThirdPartyURL);
|
|
+ const GURL local_url(chrome::kChromeUINewTabPageURL);
|
|
if (default_is_google) {
|
|
return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
|
|
}
|
|
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
|
index 122a3d93dc571..d11be4b422c8e 100644
|
|
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
|
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
|
@@ -605,7 +605,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
|
|
if (url.host_piece() == chrome::kChromeUINewTabPageHost)
|
|
return &NewWebUI<NewTabPageUI>;
|
|
if (url.host_piece() == chrome::kChromeUINewTabPageThirdPartyHost)
|
|
- return &NewWebUI<NewTabPageThirdPartyUI>;
|
|
+ return &NewWebUI<NewTabPageUI>;
|
|
}
|
|
if (url.host_piece() == chrome::kChromeUIFeedbackHost &&
|
|
FeedbackUI::IsFeedbackEnabled(profile)) {
|
|
--
|
|
2.40.1
|
|
|