0005-disable-default-extensions.patch 4.4 KB

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