0005-disable-default-extensions.patch 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --- a/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc
  2. +++ b/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc
  3. @@ -31,7 +31,6 @@ namespace extensions {
  4. bool IsComponentExtensionAllowlisted(const std::string& extension_id) {
  5. const char* const kAllowed[] = {
  6. - extension_misc::kInAppPaymentsSupportAppId,
  7. extension_misc::kPdfExtensionId,
  8. #if BUILDFLAG(IS_CHROMEOS)
  9. extension_misc::kAssessmentAssistantExtensionId,
  10. --- a/chrome/browser/extensions/component_loader.cc
  11. +++ b/chrome/browser/extensions/component_loader.cc
  12. @@ -395,11 +395,6 @@ void ComponentLoader::AddWebStoreApp() {
  13. return;
  14. }
  15. #endif
  16. -
  17. - AddWithNameAndDescription(
  18. - IDR_WEBSTORE_MANIFEST, base::FilePath(FILE_PATH_LITERAL("web_store")),
  19. - l10n_util::GetStringUTF8(IDS_WEBSTORE_NAME_STORE),
  20. - l10n_util::GetStringUTF8(IDS_WEBSTORE_APP_DESCRIPTION));
  21. }
  22. #if BUILDFLAG(IS_CHROMEOS_ASH)
  23. --- a/chrome/browser/extensions/external_component_loader.cc
  24. +++ b/chrome/browser/extensions/external_component_loader.cc
  25. @@ -37,9 +37,6 @@ ExternalComponentLoader::~ExternalCompon
  26. void ExternalComponentLoader::StartLoading() {
  27. auto prefs = base::Value::Dict();
  28. -#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
  29. - AddExternalExtension(extension_misc::kInAppPaymentsSupportAppId, prefs);
  30. -#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
  31. #if BUILDFLAG(IS_CHROMEOS)
  32. {
  33. --- a/chrome/browser/extensions/webstore_installer.cc
  34. +++ b/chrome/browser/extensions/webstore_installer.cc
  35. @@ -519,20 +519,6 @@ void WebstoreInstaller::DownloadNextPend
  36. void WebstoreInstaller::DownloadCrx(const extensions::ExtensionId& extension_id,
  37. InstallSource source) {
  38. - download_url_ = GetWebstoreInstallURL(extension_id, source);
  39. - MaybeAppendAuthUserParameter(approval_->authuser, &download_url_);
  40. -
  41. - base::FilePath user_data_dir;
  42. - base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
  43. - base::FilePath download_path = user_data_dir.Append(kWebstoreDownloadFolder);
  44. -
  45. - base::FilePath download_directory(g_download_directory_for_tests ?
  46. - *g_download_directory_for_tests : download_path);
  47. -
  48. - GetExtensionFileTaskRunner()->PostTaskAndReplyWithResult(
  49. - FROM_HERE,
  50. - base::BindOnce(&GetDownloadFilePath, download_directory, extension_id),
  51. - base::BindOnce(&WebstoreInstaller::StartDownload, this, extension_id));
  52. }
  53. // http://crbug.com/165634
  54. @@ -677,25 +663,6 @@ void WebstoreInstaller::UpdateDownloadPr
  55. void WebstoreInstaller::StartCrxInstaller(const DownloadItem& download) {
  56. DCHECK_CURRENTLY_ON(BrowserThread::UI);
  57. DCHECK(!crx_installer_.get());
  58. -
  59. - ExtensionService* service = ExtensionSystem::Get(profile_)->
  60. - extension_service();
  61. - CHECK(service);
  62. -
  63. - const Approval* approval = GetAssociatedApproval(download);
  64. - DCHECK(approval);
  65. -
  66. - crx_installer_ = download_crx_util::CreateCrxInstaller(profile_, download);
  67. -
  68. - crx_installer_->set_expected_id(approval->extension_id);
  69. - crx_installer_->set_is_gallery_install(true);
  70. - crx_installer_->set_allow_silent_install(true);
  71. - crx_installer_->AddInstallerCallback(base::BindOnce(
  72. - &WebstoreInstaller::OnInstallerDone, weak_ptr_factory_.GetWeakPtr()));
  73. - if (approval->withhold_permissions)
  74. - crx_installer_->set_withhold_permissions();
  75. -
  76. - crx_installer_->InstallCrx(download.GetFullPath());
  77. }
  78. void WebstoreInstaller::ReportFailure(const std::string& error,