chromium-browser-stable-sla.../block-requests.patch
2023-02-05 18:40:55 +00:00

89 lines
4.1 KiB
Diff

## Prevent request attempts
# chrome://discards/ attempts to use d3 to display the graph
diff --git 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
index d31f73e..dc92b2a 100644
--- 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
@@ -287,6 +287,7 @@ OneGoogleBarLoaderImpl::OneGoogleBarLoaderImpl(
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
diff --git a/chrome/browser/new_tab_page/promos/promo_service.cc b/chrome/browser/new_tab_page/promos/promo_service.cc
index 6e55aac..9710e55 100644
--- a/chrome/browser/new_tab_page/promos/promo_service.cc
+++ b/chrome/browser/new_tab_page/promos/promo_service.cc
@@ -171,6 +171,7 @@ PromoService::PromoService(
PromoService::~PromoService() = default;
void PromoService::Refresh() {
+ if ((true)) return;
std::string command_id;
// Replace the promo URL with "command:<id>" if such a command ID is set
// via the feature params.
diff --git a/chrome/browser/resources/discards/graph_doc_template.html b/chrome/browser/resources/discards/graph_doc_template.html
index 707f75a..8eb7a52 100644
--- 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 be self-contained, hence inline scripts.
}
</style>
- <script src="https://ajax.googleapis.com/ajax/libs/d3js/5.7.0/d3.min.js"
- integrity="sha384-HL96dun1KbYEq6UT/ZlsspAODCyQ+Zp4z318ajUPBPSMzy5dvxl6ziwmnil8/Cpd"
- crossorigin="anonymous">
- </script>
<script type="application/javascript">
${javascript_file}
</script>
diff --git a/chrome/browser/search/background/ntp_background_service.cc b/chrome/browser/search/background/ntp_background_service.cc
index 3129a3c..31de4ff 100644
--- a/chrome/browser/search/background/ntp_background_service.cc
+++ b/chrome/browser/search/background/ntp_background_service.cc
@@ -84,6 +84,7 @@ void NtpBackgroundService::Shutdown() {
}
void NtpBackgroundService::FetchCollectionInfo() {
+ return;
if (collections_loader_ != nullptr)
return;
collection_error_info_.ClearError();
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
index 6bb7c99..b3e4ade 100644
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
@@ -286,6 +286,7 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() {
}
void SpellcheckHunspellDictionary::DownloadDictionary(GURL url) {
+ return;
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(browser_context_);
diff --git a/components/assist_ranker/ranker_url_fetcher.cc b/components/assist_ranker/ranker_url_fetcher.cc
index 9af6e27..f78c458 100644
--- 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) {
diff --git a/components/update_client/update_checker.cc b/components/update_client/update_checker.cc
index 8cdb9a9..548fa9f 100644
--- a/components/update_client/update_checker.cc
+++ b/components/update_client/update_checker.cc
@@ -98,6 +98,7 @@ void UpdateCheckerImpl::CheckForUpdates(
scoped_refptr<UpdateContext> context,
const base::flat_map<std::string, std::string>& additional_attributes,
UpdateCheckCallback update_check_callback) {
+ return;
DCHECK(thread_checker_.CalledOnValidThread());
update_check_callback_ = std::move(update_check_callback);