diff --git a/block-requests.patch b/block-requests.patch new file mode 100644 index 0000000..13eb9d7 --- /dev/null +++ b/block-requests.patch @@ -0,0 +1,75 @@ +## Prevent request attempts +# chrome://discards/ attempts to use d3 to display the graph +--- a/chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc ++++ b/chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc +@@ -286,6 +286,7 @@ OneGoogleBarLoaderImpl::OneGoogleBarLoad + OneGoogleBarLoaderImpl::~OneGoogleBarLoaderImpl() = default; + + void OneGoogleBarLoaderImpl::Load(OneGoogleCallback callback) { ++ return; + callbacks_.push_back(std::move(callback)); + + // Note: If there is an ongoing request, abandon it. It's possible that +--- a/chrome/browser/new_tab_page/promos/promo_service.cc ++++ b/chrome/browser/new_tab_page/promos/promo_service.cc +@@ -138,6 +138,7 @@ PromoService::PromoService( + PromoService::~PromoService() = default; + + void PromoService::Refresh() { ++ return; + net::NetworkTrafficAnnotationTag traffic_annotation = + net::DefineNetworkTrafficAnnotation("promo_service", R"( + semantics { +--- a/chrome/browser/resources/discards/graph_doc_template.html ++++ b/chrome/browser/resources/discards/graph_doc_template.html +@@ -78,10 +78,6 @@ URL. As result, this document needs to b + } + + +- + +--- a/chrome/browser/search/background/ntp_background_service.cc ++++ b/chrome/browser/search/background/ntp_background_service.cc +@@ -83,6 +83,7 @@ void NtpBackgroundService::Shutdown() { + } + + void NtpBackgroundService::FetchCollectionInfo() { ++ return; + if (collections_loader_ != nullptr) + return; + collection_error_info_.ClearError(); +--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc ++++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +@@ -286,6 +286,7 @@ GURL SpellcheckHunspellDictionary::GetDi + } + + void SpellcheckHunspellDictionary::DownloadDictionary(GURL url) { ++ return; + DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK(browser_context_); + +--- a/components/assist_ranker/ranker_url_fetcher.cc ++++ b/components/assist_ranker/ranker_url_fetcher.cc +@@ -31,6 +31,7 @@ bool RankerURLFetcher::Request( + const GURL& url, + RankerURLFetcher::Callback callback, + network::mojom::URLLoaderFactory* url_loader_factory) { ++ return false; + // This function is not supposed to be called if the previous operation is not + // finished. + if (state_ == REQUESTING) { +--- a/components/update_client/update_checker.cc ++++ b/components/update_client/update_checker.cc +@@ -109,6 +109,7 @@ void UpdateCheckerImpl::CheckForUpdates( + const IdToComponentPtrMap& components, + const base::flat_map& additional_attributes, + UpdateCheckCallback update_check_callback) { ++ return; + DCHECK(thread_checker_.CalledOnValidThread()); + + ids_checked_ = ids_checked; diff --git a/chromium-browser-stable.spec b/chromium-browser-stable.spec index e45692c..641721c 100644 --- a/chromium-browser-stable.spec +++ b/chromium-browser-stable.spec @@ -99,6 +99,8 @@ Source30: master_preferences.json Source31: default_bookmarks.html Source32: chromium.default Source33: chromium-default-config.json +# by Dmitry Petrov +Source34: rosa-logo-for-new-tab-page.svg Source100: icons.tar.bz2 Source997: depot_tools.tar.xz Source999: new-system-icons.tar.xz @@ -125,6 +127,10 @@ Patch648: fix-debugsource.patch # chrome://new-tab-page-third-party -> chrome://new-tab-page Patch649: 0001-Functional-new-tab-page-with-non-Google-search-engin.patch Patch650: 0002-Yandex-as-default-search-engine.patch +# Block odd interaction with Google servers, probably including loading promo Google logos +# (e.g. an LGBT-colored one, https://clck.ru/niFdJ) +# https://github.com/Eloston/ungoogled-chromium/blob/master/patches/core/ungoogled-chromium/block-requests.patch +Patch651: block-requests.patch BuildRequires: bison BuildRequires: llvm15 @@ -347,6 +353,17 @@ cp -f %{_gostsourcedir}/src/msspi/third_party/cprocsp/include/* third_party/bori %autopatch -p1 +# We patch Chromium to open chrome://new-tab-page even with non-Google search engines +# and to use Yandex by default instead of Google for most of our users, +# but that page contains a Google logo and a search bar which utilises the chosen +# search engine, e.g. Yandex. That is why Google logo is irrelevant there. +# Replace file to avoid patching, but check that it exists: +# something has changed if it does not. +# TODO: allow to switch this image via alternatives(8): +# XXX Chromium does not allow to load "local files" due to security reasons. +test -f ./chrome/browser/resources/new_tab_page/icons/google_logo.svg +install -m0644 %{SOURCE34} ./chrome/browser/resources/new_tab_page/icons/google_logo.svg + # fatal error: 'fuzzer/FuzzedDataProvider.h' file not found # (Available in Clang10) %if %{without bundled_llvm} diff --git a/rosa-logo-for-new-tab-page.svg b/rosa-logo-for-new-tab-page.svg new file mode 100644 index 0000000..b399087 --- /dev/null +++ b/rosa-logo-for-new-tab-page.svg @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upd.sh b/upd.sh index 4803748..48dd186 100755 --- a/upd.sh +++ b/upd.sh @@ -46,7 +46,9 @@ sed -i'' .abf.yml -e '/^ chromium-/d' -e '/^ msspi-/d' abf put -n # abf put erronously uploads *.json git checkout master_preferences.json -sed -i'' .abf.yml -e '/^ master_preferences.json/d' +# store SVG in git +git checkout rosa-logo-for-new-tab-page.svg +sed -i'' .abf.yml -e '/^ master_preferences.json/d' -e '/^ rosa-logo-for-new-tab-page.svg/d' # download additional sources abf fetch