[DownloadBubble] Remove feature flag

This removes the base::Feature for kDownloadBubble as part of
post-launch cleanup. This hardcodes IsDownloadBubbleEnabled() to return
true unless the platform is ChromeOS Ash.

Cleanup of the shelf code will be done once ChromeOS Ash no longer uses
the download shelf (or no longer exists).

Bug: 1504207
Change-Id: I81e8ebc0b1e60b1523522a39d259669db0037b68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5068336
Commit-Queue: Lily Chen <chlily@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Reviewed-by: Xinghui Lu <xinghuilu@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: John Lee <johntlee@chromium.org>
Reviewed-by: Caroline Rising <corising@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1232128}
diff --git a/chrome/browser/download/bubble/download_bubble_prefs.cc b/chrome/browser/download/bubble/download_bubble_prefs.cc
index a804282..b627ced 100644
--- a/chrome/browser/download/bubble/download_bubble_prefs.cc
+++ b/chrome/browser/download/bubble/download_bubble_prefs.cc
@@ -15,13 +15,13 @@
 
 namespace download {
 
-bool IsDownloadBubbleEnabled(Profile* profile) {
+bool IsDownloadBubbleEnabled() {
 // Download bubble won't replace the old download notification in
 // Ash. See https://crbug.com/1323505.
 #if BUILDFLAG(IS_CHROMEOS_ASH)
   return false;
 #else
-  return base::FeatureList::IsEnabled(safe_browsing::kDownloadBubble);
+  return true;
 #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
 }
 
diff --git a/chrome/browser/download/bubble/download_bubble_prefs.h b/chrome/browser/download/bubble/download_bubble_prefs.h
index b6cba201..d19d1fe 100644
--- a/chrome/browser/download/bubble/download_bubble_prefs.h
+++ b/chrome/browser/download/bubble/download_bubble_prefs.h
@@ -10,8 +10,7 @@
 namespace download {
 
 // Called when deciding whether to show the bubble or the old download shelf UI.
-// TODO(chlily): Remove unused profile arg.
-bool IsDownloadBubbleEnabled(Profile* profile);
+bool IsDownloadBubbleEnabled();
 
 // Called when deciding whether to show or hide the bubble.
 bool ShouldShowDownloadBubble(Profile* profile);
diff --git a/chrome/browser/download/bubble/download_bubble_prefs_unittest.cc b/chrome/browser/download/bubble/download_bubble_prefs_unittest.cc
index 51f24822..60e3f96 100644
--- a/chrome/browser/download/bubble/download_bubble_prefs_unittest.cc
+++ b/chrome/browser/download/bubble/download_bubble_prefs_unittest.cc
@@ -18,7 +18,6 @@
 #include "chrome/test/base/testing_profile_manager.h"
 #include "components/enterprise/common/proto/connectors.pb.h"
 #include "components/prefs/pref_service.h"
-#include "components/safe_browsing/core/common/features.h"
 #include "components/safe_browsing/core/common/safe_browsing_prefs.h"
 #include "components/sync_preferences/testing_pref_service_syncable.h"
 #include "content/public/test/browser_task_environment.h"
@@ -72,28 +71,18 @@
   raw_ptr<TestingProfile, DanglingUntriaged> profile_;
   base::test::ScopedFeatureList feature_list_;
 
-  void ExpectFeatureFlagEnabledStatus(bool expect_enabled) {
-    bool is_enabled = IsDownloadBubbleEnabled(profile_);
-#if BUILDFLAG(IS_CHROMEOS_ASH)
-    EXPECT_FALSE(is_enabled);
-#else
-    EXPECT_EQ(is_enabled, expect_enabled);
-#endif
-  }
-
  private:
   content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager testing_profile_manager_;
 };
 
-TEST_F(DownloadBubblePrefsTest, FeatureFlagEnabled) {
-  feature_list_.InitAndEnableFeature(safe_browsing::kDownloadBubble);
-  ExpectFeatureFlagEnabledStatus(/*expect_enabled=*/true);
-}
-
-TEST_F(DownloadBubblePrefsTest, FeatureFlagDisabled) {
-  feature_list_.InitAndDisableFeature(safe_browsing::kDownloadBubble);
-  ExpectFeatureFlagEnabledStatus(/*expect_enabled=*/false);
+TEST_F(DownloadBubblePrefsTest, IsDownloadBubbleEnabled) {
+  bool is_enabled = IsDownloadBubbleEnabled();
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  EXPECT_FALSE(is_enabled);
+#else
+  EXPECT_TRUE(is_enabled);
+#endif
 }
 
 TEST_F(DownloadBubblePrefsTest, DoesDownloadConnectorBlock) {
diff --git a/chrome/browser/download/bubble/download_bubble_update_service_unittest.cc b/chrome/browser/download/bubble/download_bubble_update_service_unittest.cc
index 333b3623..929cae1 100644
--- a/chrome/browser/download/bubble/download_bubble_update_service_unittest.cc
+++ b/chrome/browser/download/bubble/download_bubble_update_service_unittest.cc
@@ -6,7 +6,6 @@
 
 #include <memory>
 
-#include "base/test/scoped_feature_list.h"
 #include "base/time/time.h"
 #include "build/chromeos_buildflags.h"
 #include "chrome/browser/download/bubble/download_bubble_display_info.h"
@@ -24,7 +23,6 @@
 #include "components/offline_items_collection/core/offline_item.h"
 #include "components/offline_items_collection/core/offline_item_state.h"
 #include "components/offline_items_collection/core/test_support/mock_offline_content_provider.h"
-#include "components/safe_browsing/core/common/features.h"
 #include "components/webapps/common/web_app_id.h"
 #include "content/public/browser/download_item_utils.h"
 #include "content/public/test/browser_task_environment.h"
@@ -71,9 +69,7 @@
 class DownloadBubbleUpdateServiceTest : public testing::Test {
  public:
   DownloadBubbleUpdateServiceTest()
-      : testing_profile_manager_(TestingBrowserProcess::GetGlobal()) {
-    feature_list_.InitAndEnableFeature(safe_browsing::kDownloadBubble);
-  }
+      : testing_profile_manager_(TestingBrowserProcess::GetGlobal()) {}
   DownloadBubbleUpdateServiceTest(const DownloadBubbleUpdateServiceTest&) =
       delete;
   DownloadBubbleUpdateServiceTest& operator=(
@@ -299,7 +295,6 @@
                                                    delta);
   }
 
-  base::test::ScopedFeatureList feature_list_;
   content::BrowserTaskEnvironment task_environment_{
       base::test::TaskEnvironment::TimeSource::MOCK_TIME};
   raw_ptr<NiceMock<content::MockDownloadManager>, DanglingUntriaged>
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index 43d1bdae..3f698c6 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -1891,7 +1891,7 @@
 #if !BUILDFLAG(IS_ANDROID)
 void ChromeDownloadManagerDelegate::ScheduleCancelForEphemeralWarning(
     const std::string& guid) {
-  if (!download::IsDownloadBubbleEnabled(profile_)) {
+  if (!download::IsDownloadBubbleEnabled()) {
     return;
   }
   base::SequencedTaskRunner::GetCurrentDefault()->PostDelayedTask(
@@ -1917,7 +1917,7 @@
 }
 
 void ChromeDownloadManagerDelegate::CancelAllEphemeralWarnings() {
-  if (!download::IsDownloadBubbleEnabled(profile_)) {
+  if (!download::IsDownloadBubbleEnabled()) {
     return;
   }
   content::DownloadManager::DownloadVector downloads;
diff --git a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
index b7bcc4b..74daf65 100644
--- a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
@@ -52,7 +52,6 @@
 #include "components/policy/core/common/policy_pref_names.h"
 #include "components/prefs/pref_service.h"
 #include "components/safe_browsing/buildflags.h"
-#include "components/safe_browsing/core/common/features.h"
 #include "components/safe_search_api/safe_search_util.h"
 #include "components/sync_preferences/testing_pref_service_syncable.h"
 #include "content/public/browser/download_item_utils.h"
@@ -1815,9 +1814,6 @@
 #if !BUILDFLAG(IS_ANDROID)
 #if !BUILDFLAG(IS_CHROMEOS_ASH)
 TEST_F(ChromeDownloadManagerDelegateTest, ScheduleCancelForEphemeralWarning) {
-  base::test::ScopedFeatureList feature_list;
-  feature_list.InitAndEnableFeature(safe_browsing::kDownloadBubble);
-
   std::unique_ptr<download::MockDownloadItem> download_item =
       CreateActiveDownloadItem(0);
   EXPECT_CALL(*download_item, GetDangerType())
@@ -1836,8 +1832,6 @@
 
 TEST_F(ChromeDownloadManagerDelegateTest,
        ScheduleCancelForEphemeralWarning_DownloadKept) {
-  base::test::ScopedFeatureList feature_list;
-  feature_list.InitAndEnableFeature(safe_browsing::kDownloadBubble);
   std::unique_ptr<download::MockDownloadItem> download_item =
       CreateActiveDownloadItem(0);
   EXPECT_CALL(*download_item, GetDangerType())
@@ -1853,8 +1847,6 @@
 #endif  // !BUILDFLAG(IS_CHROMEOS_ASH)
 
 TEST_F(ChromeDownloadManagerDelegateTest, CancelAllEphemeralWarnings) {
-  base::test::ScopedFeatureList feature_list;
-  feature_list.InitAndEnableFeature(safe_browsing::kDownloadBubble);
   std::vector<download::DownloadItem*> items;
   auto safe_item = CreateActiveDownloadItem(0);
   EXPECT_CALL(*safe_item, GetDangerType())
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index e920bb6..b675393 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -499,23 +499,19 @@
 // Whether download UI is visible at all (download toolbar button for download
 // bubble, or download shelf).
 bool IsDownloadUiVisible(BrowserWindow* window) {
-  return base::FeatureList::IsEnabled(safe_browsing::kDownloadBubble)
-             ? window->GetDownloadBubbleUIController()
-                   ->GetDownloadDisplayController()
-                   ->download_display_for_testing()
-                   ->IsShowing()
-             : window->IsDownloadShelfVisible();
+  return window->GetDownloadBubbleUIController()
+      ->GetDownloadDisplayController()
+      ->download_display_for_testing()
+      ->IsShowing();
 }
 
 // Whether download details are visible in the UI (partial view for download
 // bubble, or download shelf).
 bool IsDownloadDetailedUiVisible(BrowserWindow* window) {
-  return base::FeatureList::IsEnabled(safe_browsing::kDownloadBubble)
-             ? window->GetDownloadBubbleUIController()
-                   ->GetDownloadDisplayController()
-                   ->download_display_for_testing()
-                   ->IsShowingDetails()
-             : window->IsDownloadShelfVisible();
+  return window->GetDownloadBubbleUIController()
+      ->GetDownloadDisplayController()
+      ->download_display_for_testing()
+      ->IsShowingDetails();
 }
 #endif
 
@@ -4928,20 +4924,12 @@
   EXPECT_TRUE(IsDownloadDetailedUiVisible(browser()->window()));
 }
 
-class DownloadShelfTest : public DownloadTest {
- public:
-  DownloadShelfTest() {
-    feature_list_.InitAndDisableFeature(safe_browsing::kDownloadBubble);
-  }
-
- private:
-  base::test::ScopedFeatureList feature_list_;
-};
-
+// Tests for the download shelf.
+#if BUILDFLAG(IS_CHROMEOS_ASH)
 // Test that the download shelf is per-window by starting a download in one
 // tab, opening a second tab, closing the shelf, going back to the first tab,
 // and checking that the shelf is closed.
-IN_PROC_BROWSER_TEST_F(DownloadShelfTest, PerWindowShelf) {
+IN_PROC_BROWSER_TEST_F(DownloadTest, PerWindowShelf) {
   embedded_test_server()->ServeFilesFromDirectory(GetTestDataDirectory());
   ASSERT_TRUE(embedded_test_server()->Start());
   GURL url = embedded_test_server()->GetURL("/download-test3.gif");
@@ -4980,7 +4968,7 @@
 
 // Check whether the downloads shelf is closed when the downloads tab is
 // invoked.
-IN_PROC_BROWSER_TEST_F(DownloadShelfTest, CloseShelfOnDownloadsTab) {
+IN_PROC_BROWSER_TEST_F(DownloadTest, CloseShelfOnDownloadsTab) {
   embedded_test_server()->ServeFilesFromDirectory(GetTestDataDirectory());
   ASSERT_TRUE(embedded_test_server()->Start());
   GURL url =
@@ -4998,6 +4986,7 @@
   // The download shelf should now be closed.
   EXPECT_FALSE(browser()->window()->IsDownloadShelfVisible());
 }
+#endif  // BUILDFLAG(IS_CHROMEOS_ASH)
 
 // Flaky. crbug.com/1383009
 // Test that when downloading an item in Incognito mode, the download surface is
diff --git a/chrome/browser/download/download_item_model_unittest.cc b/chrome/browser/download/download_item_model_unittest.cc
index 0c64ae430..bc93573 100644
--- a/chrome/browser/download/download_item_model_unittest.cc
+++ b/chrome/browser/download/download_item_model_unittest.cc
@@ -1053,10 +1053,8 @@
     : public DownloadItemModelTest {
  public:
   DownloadItemModelImprovedDownloadBubbleWarningsTest() {
-    scoped_feature_list_.InitWithFeatures(
-        {safe_browsing::kDownloadBubble,
-         safe_browsing::kImprovedDownloadBubbleWarnings},
-        {});
+    scoped_feature_list_.InitAndEnableFeature(
+        safe_browsing::kImprovedDownloadBubbleWarnings);
   }
 
   void SetUp() override {
@@ -1385,10 +1383,8 @@
  public:
   DownloadItemModelTailoredWarningTest() {
     DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-    scoped_feature_list_.InitWithFeatures(
-        {safe_browsing::kDownloadBubble,
-         safe_browsing::kDownloadTailoredWarnings},
-        {});
+    scoped_feature_list_.InitAndEnableFeature(
+        safe_browsing::kDownloadTailoredWarnings);
   }
 
   ~DownloadItemModelTailoredWarningTest() override = default;
@@ -1526,9 +1522,8 @@
  public:
   DownloadItemModelTailoredWarningDisabledTest() {
     DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-    scoped_feature_list_.InitWithFeatures(
-        {safe_browsing::kDownloadBubble},
-        {safe_browsing::kDownloadTailoredWarnings});
+    scoped_feature_list_.InitAndDisableFeature(
+        safe_browsing::kDownloadTailoredWarnings);
   }
 
   ~DownloadItemModelTailoredWarningDisabledTest() override = default;
diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc
index 3487e86..1d30371b 100644
--- a/chrome/browser/download/download_prefs.cc
+++ b/chrome/browser/download/download_prefs.cc
@@ -707,7 +707,7 @@
 #if BUILDFLAG(IS_ANDROID)
   return false;
 #else
-  return download::IsDownloadBubbleEnabled(profile_) &&
+  return download::IsDownloadBubbleEnabled() &&
          prompt_for_duplicate_file_.GetValue();
 #endif
 }
diff --git a/chrome/browser/download/download_ui_controller.cc b/chrome/browser/download/download_ui_controller.cc
index b3817ad..1c00058 100644
--- a/chrome/browser/download/download_ui_controller.cc
+++ b/chrome/browser/download/download_ui_controller.cc
@@ -193,7 +193,7 @@
   explicit CrOSUIControllerDelegate(content::DownloadManager* manager) {
     // Conditionally add the `DownloadBubbleUIControllerDelegate`.
     auto* profile = Profile::FromBrowserContext(manager->GetBrowserContext());
-    if (download::IsDownloadBubbleEnabled(profile)) {
+    if (download::IsDownloadBubbleEnabled()) {
       delegates_.emplace_back(
           std::make_unique<DownloadBubbleUIControllerDelegate>(profile));
       InitializeDownloadBubbleUpdateService(profile, manager);
@@ -264,7 +264,7 @@
   if (!delegate_) {
     Profile* profile =
         Profile::FromBrowserContext(manager->GetBrowserContext());
-    if (download::IsDownloadBubbleEnabled(profile)) {
+    if (download::IsDownloadBubbleEnabled()) {
       delegate_ = std::make_unique<DownloadBubbleUIControllerDelegate>(profile);
       InitializeDownloadBubbleUpdateService(profile, manager);
     } else {
diff --git a/chrome/browser/download/notification/download_notification_browsertest.cc b/chrome/browser/download/notification/download_notification_browsertest.cc
index 07b1e46..66ccb95 100644
--- a/chrome/browser/download/notification/download_notification_browsertest.cc
+++ b/chrome/browser/download/notification/download_notification_browsertest.cc
@@ -19,7 +19,6 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/synchronization/lock.h"
 #include "base/task/sequenced_task_runner.h"
-#include "base/test/scoped_feature_list.h"
 #include "build/chromeos_buildflags.h"
 #include "chrome/browser/ash/profiles/profile_helper.h"
 #include "chrome/browser/browser_process.h"
@@ -42,7 +41,6 @@
 #include "chrome/test/base/ui_test_utils.h"
 #include "components/download/public/common/download_item.h"
 #include "components/prefs/pref_service.h"
-#include "components/safe_browsing/core/common/features.h"
 #include "components/session_manager/core/session_manager.h"
 #include "components/signin/public/identity_manager/identity_manager.h"
 #include "components/signin/public/identity_manager/identity_test_utils.h"
@@ -294,9 +292,7 @@
 // Base class for tests of download notifications.
 class DownloadNotificationTestBase : public InProcessBrowserTest {
  public:
-  DownloadNotificationTestBase() {
-    scoped_feature_list_.InitAndDisableFeature(safe_browsing::kDownloadBubble);
-  }
+  DownloadNotificationTestBase() = default;
 
   void SetUpOnMainThread() override {
     ASSERT_TRUE(embedded_test_server()->Start());
@@ -331,8 +327,6 @@
   std::unique_ptr<NotificationDisplayServiceTester> display_service_;
   std::unique_ptr<NotificationDisplayServiceTester> incognito_display_service_;
   std::unique_ptr<SlowDownloadInterceptor> interceptor_;
-
-  base::test::ScopedFeatureList scoped_feature_list_;
 };
 
 //////////////////////////////////////////////////
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc
index f335fdf..232adc30 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -1584,9 +1584,6 @@
 
   MaybeSetUiEnabled(service, incognito_service, extension(), params->enabled);
 
-  bool is_bubble_enabled = download::IsDownloadBubbleEnabled(
-      Profile::FromBrowserContext(browser_context()));
-
   BrowserList* browsers = BrowserList::GetInstance();
   if (browsers) {
     for (auto* browser : *browsers) {
@@ -1603,7 +1600,7 @@
       // using this API is still compatible with the new download bubble. This
       // API will eventually be deprecated (replaced by the SetUiOptions API
       // below).
-      if (is_bubble_enabled &&
+      if (download::IsDownloadBubbleEnabled() &&
           browser->window()->GetDownloadBubbleUIController()) {
         browser->window()->GetDownloadBubbleUIController()->HideDownloadUi();
       } else if (browser->window()->IsDownloadShelfVisible()) {
@@ -1643,9 +1640,6 @@
 
   MaybeSetUiEnabled(service, incognito_service, extension(), options.enabled);
 
-  bool is_bubble_enabled = download::IsDownloadBubbleEnabled(
-      Profile::FromBrowserContext(browser_context()));
-
   BrowserList* browsers = BrowserList::GetInstance();
   if (browsers) {
     for (auto* browser : *browsers) {
@@ -1658,7 +1652,7 @@
       if (!match_current_service || current_service->IsDownloadUiEnabled()) {
         continue;
       }
-      if (is_bubble_enabled &&
+      if (download::IsDownloadBubbleEnabled() &&
           browser->window()->GetDownloadBubbleUIController()) {
         browser->window()->GetDownloadBubbleUIController()->HideDownloadUi();
       } else if (browser->window()->IsDownloadShelfVisible()) {
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
index c7d404c..df61b3a6 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
@@ -26,7 +26,6 @@
 #include "base/strings/utf_string_conversion_utils.h"
 #include "base/task/single_thread_task_runner.h"
 #include "base/test/bind.h"
-#include "base/test/scoped_feature_list.h"
 #include "base/threading/thread_restrictions.h"
 #include "base/time/time.h"
 #include "base/uuid.h"
@@ -55,7 +54,6 @@
 #include "components/download/public/common/download_item.h"
 #include "components/prefs/pref_service.h"
 #include "components/safe_browsing/content/common/file_type_policies_test_util.h"
-#include "components/safe_browsing/core/common/features.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
@@ -4553,9 +4551,7 @@
 #if !BUILDFLAG(IS_CHROMEOS_ASH)
 class DownloadExtensionBubbleEnabledTest : public DownloadExtensionTest {
  public:
-  DownloadExtensionBubbleEnabledTest() {
-    feature_list_.InitAndEnableFeature(safe_browsing::kDownloadBubble);
-  }
+  DownloadExtensionBubbleEnabledTest() = default;
 
   DownloadDisplay* GetDownloadToolbarButton() {
     return current_browser()
@@ -4564,9 +4560,6 @@
         ->GetDownloadDisplayController()
         ->download_display_for_testing();
   }
-
- private:
-  base::test::ScopedFeatureList feature_list_;
 };
 
 IN_PROC_BROWSER_TEST_F(DownloadExtensionBubbleEnabledTest, SetUiOptions) {
diff --git a/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc b/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc
index 94e5afb..89bb296 100644
--- a/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc
+++ b/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc
@@ -57,7 +57,6 @@
 #include "chrome/browser/download/bubble/download_bubble_ui_controller.h"
 #include "chrome/browser/download/bubble/download_display_controller.h"
 #include "chrome/browser/ui/download/download_display.h"
-#include "components/safe_browsing/core/common/features.h"
 #endif
 
 #if BUILDFLAG(IS_WIN)
@@ -69,12 +68,10 @@
 
 #if !BUILDFLAG(IS_CHROMEOS)
 bool IsDownloadSurfaceVisible(BrowserWindow* window) {
-  return base::FeatureList::IsEnabled(safe_browsing::kDownloadBubble)
-             ? window->GetDownloadBubbleUIController()
-                   ->GetDownloadDisplayController()
-                   ->download_display_for_testing()
-                   ->IsShowingDetails()
-             : window->IsDownloadShelfVisible();
+  return window->GetDownloadBubbleUIController()
+      ->GetDownloadDisplayController()
+      ->download_display_for_testing()
+      ->IsShowingDetails();
 }
 #endif
 
diff --git a/chrome/browser/metrics/chrome_feature_list_creator.cc b/chrome/browser/metrics/chrome_feature_list_creator.cc
index 845708fc..7e1b542 100644
--- a/chrome/browser/metrics/chrome_feature_list_creator.cc
+++ b/chrome/browser/metrics/chrome_feature_list_creator.cc
@@ -91,9 +91,6 @@
        std::cref(safe_browsing::kDeepScanningEncryptedArchives),
        base::FeatureList::OVERRIDE_ENABLE_FEATURE},
       {switches::kEnableDownloadWarningImprovements,
-       std::cref(safe_browsing::kDownloadBubble),
-       base::FeatureList::OVERRIDE_ENABLE_FEATURE},
-      {switches::kEnableDownloadWarningImprovements,
        std::cref(safe_browsing::kDownloadTailoredWarnings),
        base::FeatureList::OVERRIDE_ENABLE_FEATURE},
       {switches::kEnableDownloadWarningImprovements,
diff --git a/chrome/browser/ui/download/download_bubble_row_view_info_unittest.cc b/chrome/browser/ui/download/download_bubble_row_view_info_unittest.cc
index 6e0a5be..ac59746b 100644
--- a/chrome/browser/ui/download/download_bubble_row_view_info_unittest.cc
+++ b/chrome/browser/ui/download/download_bubble_row_view_info_unittest.cc
@@ -46,12 +46,10 @@
 class DownloadBubbleRowViewInfoTest : public testing::Test,
                                       public DownloadBubbleRowViewInfoObserver {
  public:
-  DownloadBubbleRowViewInfoTest() {
-    scoped_feature_list_.InitAndEnableFeature(safe_browsing::kDownloadBubble);
-  }
+  DownloadBubbleRowViewInfoTest() = default;
 
   void SetUp() override {
-    if (!download::IsDownloadBubbleEnabled(profile())) {
+    if (!download::IsDownloadBubbleEnabled()) {
       GTEST_SKIP();
     }
     item_ = std::make_unique<NiceMock<download::MockDownloadItem>>();
@@ -127,7 +125,6 @@
     }
   }
 
-  base::test::ScopedFeatureList scoped_feature_list_;
   content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<NiceMock<download::MockDownloadItem>> item_;
diff --git a/chrome/browser/ui/views/download/bubble/download_bubble_interactive_uitest.cc b/chrome/browser/ui/views/download/bubble/download_bubble_interactive_uitest.cc
index 5168bff..5bdeb80 100644
--- a/chrome/browser/ui/views/download/bubble/download_bubble_interactive_uitest.cc
+++ b/chrome/browser/ui/views/download/bubble/download_bubble_interactive_uitest.cc
@@ -19,7 +19,6 @@
 #include "chrome/test/interaction/interactive_browser_test.h"
 #include "components/feature_engagement/public/feature_constants.h"
 #include "components/feature_engagement/test/scoped_iph_feature_list.h"
-#include "components/safe_browsing/core/common/features.h"
 #include "components/user_education/test/feature_promo_test_util.h"
 #include "content/public/test/browser_test.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -62,8 +61,7 @@
  public:
   DownloadBubbleInteractiveUiTest() {
     test_features_.InitAndEnableFeatures(
-        {feature_engagement::kIPHDownloadToolbarButtonFeature,
-         safe_browsing::kDownloadBubble
+        {feature_engagement::kIPHDownloadToolbarButtonFeature
 #if BUILDFLAG(IS_MAC)
          ,
          features::kImmersiveFullscreen
diff --git a/chrome/browser/ui/views/download/bubble/download_bubble_row_list_view_unittest.cc b/chrome/browser/ui/views/download/bubble/download_bubble_row_list_view_unittest.cc
index 7843b78..9cf9e7b 100644
--- a/chrome/browser/ui/views/download/bubble/download_bubble_row_list_view_unittest.cc
+++ b/chrome/browser/ui/views/download/bubble/download_bubble_row_list_view_unittest.cc
@@ -5,7 +5,6 @@
 #include "chrome/browser/ui/views/download/bubble/download_bubble_row_list_view.h"
 
 #include "base/strings/string_number_conversions.h"
-#include "base/test/scoped_feature_list.h"
 #include "chrome/browser/download/bubble/download_bubble_ui_controller.h"
 #include "chrome/browser/download/download_item_model.h"
 #include "chrome/browser/download/offline_item_utils.h"
@@ -17,7 +16,6 @@
 #include "components/download/public/common/download_item.h"
 #include "components/download/public/common/mock_download_item.h"
 #include "components/offline_items_collection/core/offline_item.h"
-#include "components/safe_browsing/core/common/features.h"
 #include "content/public/browser/download_item_utils.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -32,9 +30,7 @@
 
 class DownloadBubbleRowListViewTest : public TestWithBrowserView {
  public:
-  DownloadBubbleRowListViewTest() {
-    scoped_feature_list_.InitAndEnableFeature(safe_browsing::kDownloadBubble);
-  }
+  DownloadBubbleRowListViewTest() = default;
   ~DownloadBubbleRowListViewTest() override = default;
 
   DownloadBubbleRowListViewTest(const DownloadBubbleRowListViewTest&) = delete;
@@ -93,7 +89,6 @@
   }
 
  protected:
-  base::test::ScopedFeatureList scoped_feature_list_;
   std::unique_ptr<DownloadBubbleRowListViewInfo> info_;
   std::unique_ptr<DownloadBubbleRowListView> row_list_view_;
   std::vector<std::unique_ptr<NiceMock<download::MockDownloadItem>>>
diff --git a/chrome/browser/ui/views/download/bubble/download_bubble_row_view_unittest.cc b/chrome/browser/ui/views/download/bubble/download_bubble_row_view_unittest.cc
index 804287d..7993214 100644
--- a/chrome/browser/ui/views/download/bubble/download_bubble_row_view_unittest.cc
+++ b/chrome/browser/ui/views/download/bubble/download_bubble_row_view_unittest.cc
@@ -12,7 +12,6 @@
 #include "chrome/browser/ui/views/frame/test_with_browser_view.h"
 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
 #include "components/download/public/common/mock_download_item.h"
-#include "components/safe_browsing/core/common/features.h"
 #include "components/vector_icons/vector_icons.h"
 #include "content/public/browser/download_item_utils.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -37,9 +36,7 @@
  public:
   DownloadBubbleRowViewTest()
       : TestWithBrowserView(
-            content::BrowserTaskEnvironment::TimeSource::MOCK_TIME) {
-    scoped_feature_list_.InitAndEnableFeature(safe_browsing::kDownloadBubble);
-  }
+            content::BrowserTaskEnvironment::TimeSource::MOCK_TIME) {}
 
   DownloadBubbleRowViewTest(const DownloadBubbleRowViewTest&) = delete;
   DownloadBubbleRowViewTest& operator=(const DownloadBubbleRowViewTest&) =
@@ -80,7 +77,6 @@
   download::MockDownloadItem* download_item() { return &download_item_; }
 
  protected:
-  base::test::ScopedFeatureList scoped_feature_list_;
   NiceMock<download::MockDownloadItem> download_item_;
   std::unique_ptr<DownloadBubbleRowViewInfo> info_;
   std::unique_ptr<DownloadBubbleRowView> row_view_;
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 49e5c02..c74a820c 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -3048,8 +3048,7 @@
   // Don't show download shelf if download bubble is enabled, except that the
   // shelf is already showing (this can happen if prefs were changed at
   // runtime).
-  if (download::IsDownloadBubbleEnabled(browser_->profile()) &&
-      !download_shelf_) {
+  if (download::IsDownloadBubbleEnabled() && !download_shelf_) {
     return nullptr;
   }
   if (!download_shelf_) {
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index 7a948e9..f7f763c 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -278,7 +278,7 @@
   size_animation_.Reset(1);
 
   std::unique_ptr<DownloadToolbarButtonView> download_button;
-  if (download::IsDownloadBubbleEnabled(browser_->profile())) {
+  if (download::IsDownloadBubbleEnabled()) {
     download_button =
         std::make_unique<DownloadToolbarButtonView>(browser_view_);
   }
diff --git a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc
index 14eead9..dedd6343 100644
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc
@@ -68,7 +68,6 @@
 #include "chrome/test/base/ui_test_utils.h"
 #include "components/infobars/content/content_infobar_manager.h"
 #include "components/permissions/permission_request_manager.h"
-#include "components/safe_browsing/core/common/features.h"
 #include "components/webapps/services/web_app_origin_association/test/test_web_app_origin_association_fetcher.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/render_view_host.h"
@@ -842,9 +841,7 @@
     }
   };
 
-  WebAppFrameToolbarBrowserTest_WindowControlsOverlay() {
-    scoped_feature_list_.InitAndEnableFeature(safe_browsing::kDownloadBubble);
-  }
+  WebAppFrameToolbarBrowserTest_WindowControlsOverlay() = default;
 
   void SetUp() override {
     ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
@@ -985,7 +982,6 @@
   content::test::FencedFrameTestHelper fenced_frame_helper_;
 
  private:
-  base::test::ScopedFeatureList scoped_feature_list_;
   base::ScopedTempDir temp_dir_;
 };
 
diff --git a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc
index c7a1fdc..743952a 100644
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc
@@ -162,7 +162,7 @@
                                static_cast<int>(HTCLIENT));
   }
 
-  if (download::IsDownloadBubbleEnabled(browser_view_->browser()->profile())) {
+  if (download::IsDownloadBubbleEnabled()) {
     download_button_ = AddChildView(
         std::make_unique<DownloadToolbarButtonView>(browser_view_));
     views::SetHitTestComponent(download_button_, static_cast<int>(HTCLIENT));
diff --git a/chrome/browser/ui/webui/settings/settings_ui.cc b/chrome/browser/ui/webui/settings/settings_ui.cc
index c77b019..44321944 100644
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
@@ -396,7 +396,7 @@
 
   html_source->AddBoolean(
       "downloadBubblePartialViewControlledByPref",
-      download::IsDownloadBubbleEnabled(profile) &&
+      download::IsDownloadBubbleEnabled() &&
           download::IsDownloadBubblePartialViewControlledByPref());
 
 #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
diff --git a/components/safe_browsing/core/common/features.cc b/components/safe_browsing/core/common/features.cc
index 60319504..f3e51b2 100644
--- a/components/safe_browsing/core/common/features.cc
+++ b/components/safe_browsing/core/common/features.cc
@@ -68,10 +68,6 @@
     &kDelayedWarnings, "mouse",
     /*default_value=*/false};
 
-BASE_FEATURE(kDownloadBubble,
-             "DownloadBubble",
-             base::FEATURE_ENABLED_BY_DEFAULT);
-
 BASE_FEATURE(kDownloadTailoredWarnings,
              "DownloadTailoredWarnings",
              base::FEATURE_ENABLED_BY_DEFAULT);
@@ -385,7 +381,6 @@
     {&kClientSideDetectionTypeForceRequest, true},
     {&kCreateWarningShownClientSafeBrowsingReports, false},
     {&kDelayedWarnings, true},
-    {&kDownloadBubble, true},
     {&kDownloadTailoredWarnings, true},
     {&kEvaluateProtectedPasswordLengthMinimum, false},
     {&kExtensionTelemetryDisableOffstoreExtensions, true},
diff --git a/components/safe_browsing/core/common/features.h b/components/safe_browsing/core/common/features.h
index 63301fd..24005f7 100644
--- a/components/safe_browsing/core/common/features.h
+++ b/components/safe_browsing/core/common/features.h
@@ -60,9 +60,6 @@
 // warnings feature is enabled.
 extern const base::FeatureParam<bool> kDelayedWarningsEnableMouseClicks;
 
-// Whether to use download bubble instead of download shelf.
-BASE_DECLARE_FEATURE(kDownloadBubble);
-
 // The kill switch for download tailored warnings. The main control is on the
 // server-side.
 BASE_DECLARE_FEATURE(kDownloadTailoredWarnings);