chromium-browser-stable-test/block-requests.patch

112 lines
4.8 KiB
Diff
Raw Normal View History

## Prevent request attempts
# chrome://discards/ attempts to use d3 to display the graph
2024-02-22 00:08:13 +00:00
# New tab page tries to download background images
# New tab page attempts to download the 'One Google' bar
# New tab page attempts to load promos
# Password manager attempts to get credential affiliation
# Attempts to check for updates even with autoupdate disabled
# Dev tools attempts to download css data
--- 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
2023-05-03 20:13:35 +00:00
@@ -287,6 +287,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
2022-09-27 23:00:12 +03:00
@@ -171,6 +171,7 @@ PromoService::PromoService(
PromoService::~PromoService() = default;
void PromoService::Refresh() {
2022-09-27 23:00:12 +03:00
+ 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.
--- a/chrome/browser/search/background/ntp_background_service.cc
+++ b/chrome/browser/search/background/ntp_background_service.cc
2024-02-22 00:08:13 +00:00
@@ -97,6 +97,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
2024-02-22 00:08:13 +00:00
@@ -280,6 +280,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) {
2024-02-22 00:08:13 +00:00
--- a/components/password_manager/core/browser/affiliation/hash_affiliation_fetcher.cc
+++ b/components/password_manager/core/browser/affiliation/hash_affiliation_fetcher.cc
@@ -52,6 +52,9 @@ HashAffiliationFetcher::HashAffiliationF
HashAffiliationFetcher::~HashAffiliationFetcher() = default;
void HashAffiliationFetcher::StartRequest(
+ const std::vector<FacetURI>& a, RequestInfo b) {}
+[[maybe_unused]]
+void HashAffiliationFetcher::DeadStartRequest(
const std::vector<FacetURI>& facet_uris,
RequestInfo request_info) {
requested_facet_uris_ = facet_uris;
--- a/components/password_manager/core/browser/affiliation/hash_affiliation_fetcher.h
+++ b/components/password_manager/core/browser/affiliation/hash_affiliation_fetcher.h
@@ -22,6 +22,7 @@ class HashAffiliationFetcher : public Af
void StartRequest(const std::vector<FacetURI>& facet_uris,
RequestInfo request_info) override;
+ void DeadStartRequest(const std::vector<FacetURI>& a, RequestInfo b);
// AffiliationFetcherInterface
const std::vector<FacetURI>& GetRequestedFacetURIs() const override;
--- a/components/update_client/update_checker.cc
+++ b/components/update_client/update_checker.cc
2024-02-22 00:08:13 +00:00
@@ -100,6 +100,7 @@ void UpdateCheckerImpl::CheckForUpdates(
2022-09-27 23:00:12 +03:00
scoped_refptr<UpdateContext> context,
const base::flat_map<std::string, std::string>& additional_attributes,
UpdateCheckCallback update_check_callback) {
+ return;
2023-05-03 20:13:35 +00:00
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
2022-09-27 23:00:12 +03:00
update_check_callback_ = std::move(update_check_callback);
2024-02-22 00:08:13 +00:00
--- a/third_party/devtools-frontend/src/front_end/panels/elements/WebCustomData.ts
+++ b/third_party/devtools-frontend/src/front_end/panels/elements/WebCustomData.ts
@@ -19,18 +19,7 @@ export class WebCustomData {
readonly fetchPromiseForTest: Promise<unknown>;
constructor(remoteBase: string) {
- if (!remoteBase) {
this.fetchPromiseForTest = Promise.resolve();
- return;
- }
- this.fetchPromiseForTest = fetch(`${remoteBase}third_party/vscode.web-custom-data/browsers.css-data.json`)
- .then(response => response.json())
- .then((json: CSSBrowserData) => {
- for (const property of json.properties) {
- this.#data.set(property.name, property);
- }
- })
- .catch();
}
/**