mirror of
https://github.com/imputnet/helium.git
synced 2026-10-19 01:39:56 -05:00
patches/helium: send generic platform info when downloading extensions
This commit is contained in:
2 files changed
+64
No files matched your search
@@ -0,0 +1,63 @@
|
||||
--- a/components/update_client/update_query_params.h
|
||||
+++ b/components/update_client/update_query_params.h
|
||||
@@ -18,7 +18,7 @@ class UpdateQueryParamsDelegate;
|
||||
// browser process.
|
||||
class UpdateQueryParams {
|
||||
public:
|
||||
- enum ProdId { CHROME = 0, CRX, WEBVIEW };
|
||||
+ enum ProdId { CHROME = 0, CRX, WEBVIEW, CRX_DUMMY };
|
||||
|
||||
UpdateQueryParams() = delete;
|
||||
UpdateQueryParams(const UpdateQueryParams&) = delete;
|
||||
--- a/components/update_client/update_query_params.cc
|
||||
+++ b/components/update_client/update_query_params.cc
|
||||
@@ -68,7 +68,7 @@ const char kArch[] =
|
||||
#error "unknown arch"
|
||||
#endif
|
||||
|
||||
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
+#if true
|
||||
const char kChrome[] = "chrome";
|
||||
const char kCrx[] = "chromecrx";
|
||||
const char kWebView[] = "googleandroidwebview";
|
||||
@@ -84,6 +84,10 @@ UpdateQueryParamsDelegate* g_delegate =
|
||||
|
||||
// static
|
||||
std::string UpdateQueryParams::Get(ProdId prod) {
|
||||
+ if (prod == CRX_DUMMY) {
|
||||
+ return "os=win&arch=x64&os_arch=x86_64&nacl_arch=x86-64&prod=chromecrx&acceptformat=crx3,puff";
|
||||
+ }
|
||||
+
|
||||
return base::StringPrintf(
|
||||
"os=%s&arch=%s&os_arch=%s&nacl_arch=%s&prod=%s%s&acceptformat=crx3,puff",
|
||||
kOs, kArch, base::SysInfo().OperatingSystemArchitecture().c_str(),
|
||||
@@ -97,6 +101,7 @@ const char* UpdateQueryParams::GetProdId
|
||||
case UpdateQueryParams::CHROME:
|
||||
return kChrome;
|
||||
case UpdateQueryParams::CRX:
|
||||
+ case UpdateQueryParams::CRX_DUMMY:
|
||||
return kCrx;
|
||||
case UpdateQueryParams::WEBVIEW:
|
||||
return kWebView;
|
||||
--- a/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc
|
||||
+++ b/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc
|
||||
@@ -43,7 +43,7 @@ ChromeExtensionDownloaderFactory::Create
|
||||
}
|
||||
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
std::string manifest_query_params =
|
||||
- UpdateQueryParams::Get(UpdateQueryParams::CRX);
|
||||
+ UpdateQueryParams::Get(UpdateQueryParams::CRX_DUMMY);
|
||||
base::CommandLine* command_line =
|
||||
base::CommandLine::ForCurrentProcess();
|
||||
if (command_line->HasSwitch(extensions::kSwitchTestRequestParam)) {
|
||||
--- a/chrome/browser/extensions/webstore_installer.cc
|
||||
+++ b/chrome/browser/extensions/webstore_installer.cc
|
||||
@@ -210,7 +210,7 @@ GURL WebstoreInstaller::GetWebstoreInsta
|
||||
GURL url(
|
||||
url_string + "?response=redirect&" +
|
||||
update_client::UpdateQueryParams::Get(
|
||||
- update_client::UpdateQueryParams::CRX) +
|
||||
+ update_client::UpdateQueryParams::CRX_DUMMY) +
|
||||
"&x=" + base::EscapeQueryParamValue(base::JoinString(params, "&"), true));
|
||||
DCHECK(url.is_valid());
|
||||
|
||||
@@ -139,6 +139,7 @@ helium/core/replace-default-profile-name.patch
|
||||
helium/core/disable-live-caption-completely.patch
|
||||
helium/core/remove-read-anything-context-menu-entry.patch
|
||||
helium/core/unthemify-onboarding-favicon.patch
|
||||
helium/core/spoof-extension-downloader-platform.patch
|
||||
|
||||
helium/settings/move-search-suggest.patch
|
||||
helium/settings/remove-autofill.patch
|
||||
|
||||
Reference in new issue
Block a user