Files
cromite/build/patches/00WIN-minimum-data-to-enable-install-extensions.patch
T

70 lines
3.3 KiB
Diff

From: uazo <uazo@users.noreply.github.com>
Date: Sat, 15 Apr 2023 10:25:33 +0000
Subject: WIN minimum data to enable install extensions
The amount of information sent is minimized without disabling
the ability to install extensions (which is under user control)
---
chrome/browser/extensions/webstore_install_helper.cc | 2 +-
chrome/browser/extensions/webstore_installer.cc | 2 +-
.../update_client/chrome_update_query_params_delegate.cc | 5 ++---
components/update_client/update_query_params.cc | 5 ++---
4 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/chrome/browser/extensions/webstore_install_helper.cc b/chrome/browser/extensions/webstore_install_helper.cc
--- a/chrome/browser/extensions/webstore_install_helper.cc
+++ b/chrome/browser/extensions/webstore_install_helper.cc
@@ -46,7 +46,7 @@ void WebstoreInstallHelper::Start(
data_decoder::DataDecoder::ParseJsonIsolated(
manifest_, base::BindOnce(&WebstoreInstallHelper::OnJSONParsed, this));
- if (icon_url_.is_empty()) {
+ if ((true) || icon_url_.is_empty()) {
icon_decode_complete_ = true;
} else {
// No existing |icon_fetcher_| to avoid unbalanced AddRef().
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -644,7 +644,7 @@ void WebstoreInstaller::StartDownload(const std::string& extension_id,
download_url_, render_process_host_id, render_frame_host->GetRoutingID(),
traffic_annotation));
params->set_file_path(file);
- if (controller.GetVisibleEntry()) {
+ if ((false) && controller.GetVisibleEntry()) {
content::Referrer referrer = content::Referrer::SanitizeForRequest(
download_url_,
content::Referrer(controller.GetVisibleEntry()->GetURL(),
diff --git a/chrome/browser/update_client/chrome_update_query_params_delegate.cc b/chrome/browser/update_client/chrome_update_query_params_delegate.cc
--- a/chrome/browser/update_client/chrome_update_query_params_delegate.cc
+++ b/chrome/browser/update_client/chrome_update_query_params_delegate.cc
@@ -31,9 +31,8 @@ ChromeUpdateQueryParamsDelegate::GetInstance() {
std::string ChromeUpdateQueryParamsDelegate::GetExtraParams() {
return base::StringPrintf(
- "&prodchannel=%s&prodversion=%s&lang=%s",
- chrome::GetChannelName(chrome::WithExtendedStable(true)).c_str(),
- version_info::GetVersionNumber().c_str(), GetLang());
+ "&prodversion=%s.0.0.0",
+ version_info::GetMajorVersionNumber().c_str());
}
// static
diff --git a/components/update_client/update_query_params.cc b/components/update_client/update_query_params.cc
--- a/components/update_client/update_query_params.cc
+++ b/components/update_client/update_query_params.cc
@@ -86,9 +86,8 @@ UpdateQueryParamsDelegate* g_delegate = nullptr;
// static
std::string UpdateQueryParams::Get(ProdId prod) {
return base::StringPrintf(
- "os=%s&arch=%s&os_arch=%s&nacl_arch=%s&prod=%s%s&acceptformat=crx3", kOs,
- kArch, base::SysInfo().OperatingSystemArchitecture().c_str(),
- GetNaclArch(), GetProdIdString(prod),
+ "prod=%s%s&acceptformat=crx3",
+ GetProdIdString(prod),
g_delegate ? g_delegate->GetExtraParams().c_str() : "");
}
--
2.25.1