0005-disable-default-extensions.patch 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. --- a/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc
  2. +++ b/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc
  3. @@ -26,7 +26,6 @@ namespace extensions {
  4. bool IsComponentExtensionWhitelisted(const std::string& extension_id) {
  5. const char* const kAllowed[] = {
  6. - extension_misc::kInAppPaymentsSupportAppId,
  7. extension_misc::kMediaRouterStableExtensionId,
  8. extension_misc::kPdfExtensionId,
  9. #if defined(OS_CHROMEOS)
  10. --- a/chrome/browser/extensions/component_loader.cc
  11. +++ b/chrome/browser/extensions/component_loader.cc
  12. @@ -347,11 +347,6 @@ void ComponentLoader::AddWebStoreApp() {
  13. if (!IsNormalSession())
  14. return;
  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 defined(OS_CHROMEOS)
  23. @@ -455,11 +450,6 @@ void ComponentLoader::AddDefaultComponen
  24. AddKeyboardApp();
  25. #else // defined(OS_CHROMEOS)
  26. DCHECK(!skip_session_components);
  27. -#if BUILDFLAG(ENABLE_PRINTING)
  28. - // Cloud Print component app. Not required on Chrome OS.
  29. - Add(IDR_CLOUDPRINT_MANIFEST,
  30. - base::FilePath(FILE_PATH_LITERAL("cloud_print")));
  31. -#endif // BUILDFLAG(ENABLE_PRINTING)
  32. #endif // defined(OS_CHROMEOS)
  33. if (!skip_session_components) {
  34. @@ -533,13 +523,6 @@ void ComponentLoader::AddDefaultComponen
  35. AddHangoutServicesExtension();
  36. #endif // BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION)
  37. - bool install_feedback = enable_background_extensions_during_testing;
  38. -#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
  39. - install_feedback = true;
  40. -#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
  41. - if (install_feedback)
  42. - Add(IDR_FEEDBACK_MANIFEST, base::FilePath(FILE_PATH_LITERAL("feedback")));
  43. -
  44. #if defined(OS_CHROMEOS)
  45. AddChromeCameraApp();
  46. AddVideoPlayerExtension();
  47. --- a/chrome/browser/extensions/external_component_loader.cc
  48. +++ b/chrome/browser/extensions/external_component_loader.cc
  49. @@ -30,9 +30,6 @@ ExternalComponentLoader::~ExternalCompon
  50. void ExternalComponentLoader::StartLoading() {
  51. auto prefs = std::make_unique<base::DictionaryValue>();
  52. -#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
  53. - AddExternalExtension(extension_misc::kInAppPaymentsSupportAppId, prefs.get());
  54. -#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
  55. #if defined(OS_CHROMEOS)
  56. {
  57. --- a/chrome/browser/extensions/webstore_installer.cc
  58. +++ b/chrome/browser/extensions/webstore_installer.cc
  59. @@ -562,20 +562,6 @@ void WebstoreInstaller::DownloadNextPend
  60. void WebstoreInstaller::DownloadCrx(
  61. const std::string& extension_id,
  62. InstallSource source) {
  63. - download_url_ = GetWebstoreInstallURL(extension_id, source);
  64. - MaybeAppendAuthUserParameter(approval_->authuser, &download_url_);
  65. -
  66. - base::FilePath user_data_dir;
  67. - base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
  68. - base::FilePath download_path = user_data_dir.Append(kWebstoreDownloadFolder);
  69. -
  70. - base::FilePath download_directory(g_download_directory_for_tests ?
  71. - *g_download_directory_for_tests : download_path);
  72. -
  73. - base::PostTaskAndReplyWithResult(
  74. - GetExtensionFileTaskRunner().get(), FROM_HERE,
  75. - base::BindOnce(&GetDownloadFilePath, download_directory, extension_id),
  76. - base::BindOnce(&WebstoreInstaller::StartDownload, this, extension_id));
  77. }
  78. // http://crbug.com/165634
  79. @@ -722,21 +708,6 @@ void WebstoreInstaller::UpdateDownloadPr
  80. void WebstoreInstaller::StartCrxInstaller(const DownloadItem& download) {
  81. DCHECK_CURRENTLY_ON(BrowserThread::UI);
  82. DCHECK(!crx_installer_.get());
  83. -
  84. - ExtensionService* service = ExtensionSystem::Get(profile_)->
  85. - extension_service();
  86. - CHECK(service);
  87. -
  88. - const Approval* approval = GetAssociatedApproval(download);
  89. - DCHECK(approval);
  90. -
  91. - crx_installer_ = download_crx_util::CreateCrxInstaller(profile_, download);
  92. -
  93. - crx_installer_->set_expected_id(approval->extension_id);
  94. - crx_installer_->set_is_gallery_install(true);
  95. - crx_installer_->set_allow_silent_install(true);
  96. -
  97. - crx_installer_->InstallCrx(download.GetFullPath());
  98. }
  99. void WebstoreInstaller::ReportFailure(const std::string& error,