  // Returns true if this is an extension download. This also considers user
  // scripts to be extension downloads, since we convert those automatically.
  bool IsExtensionDownload(const download::DownloadItem& download_item);
---- a/chrome/browser/download/download_item_model.cc
-+++ b/chrome/browser/download/download_item_model.cc
-@@ -540,16 +540,16 @@ bool DownloadItemModel::IsCommandEnabled
-       return download_->CanShowInFolder();
-     case DownloadCommands::OPEN_WHEN_COMPLETE:
-       return download_->CanOpenDownload() &&
--             !download_crx_util::IsExtensionDownload(*download_);
-+             !IsExtensionDownload();
-     case DownloadCommands::PLATFORM_OPEN:
-       return download_->CanOpenDownload() &&
--             !download_crx_util::IsExtensionDownload(*download_);
-+             !IsExtensionDownload();
-     case DownloadCommands::ALWAYS_OPEN_TYPE:
-       // For temporary downloads, the target filename might be a temporary
-       // filename. Don't base an "Always open" decision based on it. Also
-       // exclude extensions.
-       return download_->CanOpenDownload() &&
--             !download_crx_util::IsExtensionDownload(*download_);
-+             !IsExtensionDownload();
-     case DownloadCommands::PAUSE:
-       return !download_->IsSavePackageDownload() &&
-              DownloadUIModel::IsCommandEnabled(download_commands, command);
-@@ -576,7 +576,7 @@ bool DownloadItemModel::IsCommandChecked
-   switch (command) {
-     case DownloadCommands::OPEN_WHEN_COMPLETE:
-       return download_->GetOpenWhenComplete() ||
--             download_crx_util::IsExtensionDownload(*download_);
-+             IsExtensionDownload();
-     case DownloadCommands::ALWAYS_OPEN_TYPE:
- #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-       if (download_commands->CanOpenPdfInSystemViewer()) {
-@@ -746,7 +746,13 @@ std::string DownloadItemModel::GetMimeTy
- }
- 
- bool DownloadItemModel::IsExtensionDownload() const {
--  return download_crx_util::IsExtensionDownload(*download_);
-+  // Derivation of boolean statement:
-+  // In original code, "IsExtensionDownload" always meant the extension
-+  // was installed.
-+  // In ungoogled code, "IsExtensionDownload && !ShouldDownloadAsRegularFile"
-+  // is true iff this extension is to be installed.
-+  return download_crx_util::IsExtensionDownload(*download_) &&
-+      !download_crx_util::ShouldDownloadAsRegularFile();
- }
- 
- #if BUILDFLAG(FULL_SAFE_BROWSING)
 --- a/chrome/browser/download/download_target_determiner.cc
 +++ b/chrome/browser/download/download_target_determiner.cc
 @@ -1018,10 +1018,12 @@ DownloadConfirmationReason DownloadTarge

 #endif
 
   // Don't prompt for file types that are marked for opening automatically.
--- a/chrome/browser/download/notification/download_item_notification.cc
+++ b/chrome/browser/download/notification/download_item_notification.cc
@@ -193,7 +193,7 @@ void RecordButtonClickAction(DownloadCom
 
 bool IsExtensionDownload(DownloadUIModel* item) {
   return item->download() &&
-         download_crx_util::IsExtensionDownload(*item->download());
+         item->IsExtensionDownload();
 }
 
 }  // namespace
--- a/chrome/browser/extensions/extension_management.cc
+++ b/chrome/browser/extensions/extension_management.cc
@@ -8,6 +8,7 @@

     {"enable-stacked-tab-strip",
      "Enable stacking in tab strip",
      "Forces tabs to be stacked in the tab strip. Otherwise, they follow default behavior.",
--- a/chrome/browser/download/download_crx_util.cc
+++ b/chrome/browser/download/download_crx_util.cc
@@ -6,6 +6,7 @@
