diff --git a/app/brave_generated_resources.grd b/app/brave_generated_resources.grd index 3d234b95f00..d6d25ca0937 100644 --- a/app/brave_generated_resources.grd +++ b/app/brave_generated_resources.grd @@ -429,10 +429,6 @@ Or change later at $2brave://settings/ext Open link in Brave private window with Tor - - - Beginning on December 1, 2023, Brave Dev channel will no longer receive browser updates. We recommend users migrate to the Nightly, Beta, or Release versions of Brave. - diff --git a/browser/infobars/dev_channel_deprecation_infobar_delegate.cc b/browser/infobars/dev_channel_deprecation_infobar_delegate.cc deleted file mode 100644 index 255218eda13..00000000000 --- a/browser/infobars/dev_channel_deprecation_infobar_delegate.cc +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (c) 2023 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at https://mozilla.org/MPL/2.0/. */ - -#include "brave/browser/infobars/dev_channel_deprecation_infobar_delegate.h" - -#include - -#include "brave/browser/infobars/brave_confirm_infobar_creator.h" -#include "brave/components/constants/url_constants.h" -#include "brave/grit/brave_generated_resources.h" -#include "chrome/common/channel_info.h" -#include "components/infobars/core/infobar.h" -#include "components/strings/grit/components_strings.h" -#include "components/version_info/channel.h" -#include "ui/base/l10n/l10n_util.h" - -// static -void DevChannelDeprecationInfoBarDelegate::CreateIfNeeded( - infobars::InfoBarManager* infobar_manager) { - if (chrome::GetChannel() == version_info::Channel::DEV) { - infobar_manager->AddInfoBar( - CreateBraveConfirmInfoBar(std::unique_ptr( - new DevChannelDeprecationInfoBarDelegate()))); - } -} - -DevChannelDeprecationInfoBarDelegate::~DevChannelDeprecationInfoBarDelegate() = - default; - -DevChannelDeprecationInfoBarDelegate::DevChannelDeprecationInfoBarDelegate() = - default; - -infobars::InfoBarDelegate::InfoBarIdentifier -DevChannelDeprecationInfoBarDelegate::GetIdentifier() const { - return DEV_CHANNEL_DEPRECATION_INFOBAR_DELEGATE; -} - -std::u16string DevChannelDeprecationInfoBarDelegate::GetMessageText() const { - return l10n_util::GetStringUTF16(IDS_DEV_CHANNEL_DEPRECATION_INFOBAR_MESSAGE); -} - -int DevChannelDeprecationInfoBarDelegate::GetButtons() const { - return BUTTON_NONE; -} - -std::vector DevChannelDeprecationInfoBarDelegate::GetButtonsOrder() const { - return {}; -} - -bool DevChannelDeprecationInfoBarDelegate::ShouldExpire( - const NavigationDetails& details) const { - // Since deprecation infobar communicates critical state, it should persist - // until explicitly dismissed. - return false; -} - -std::u16string DevChannelDeprecationInfoBarDelegate::GetLinkText() const { - return l10n_util::GetStringUTF16(IDS_LEARN_MORE); -} - -GURL DevChannelDeprecationInfoBarDelegate::GetLinkURL() const { - return GURL(kDevChannelDeprecationLearnMoreUrl); -} diff --git a/browser/infobars/dev_channel_deprecation_infobar_delegate.h b/browser/infobars/dev_channel_deprecation_infobar_delegate.h deleted file mode 100644 index 068d19659ac..00000000000 --- a/browser/infobars/dev_channel_deprecation_infobar_delegate.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2023 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at https://mozilla.org/MPL/2.0/. */ - -#ifndef BRAVE_BROWSER_INFOBARS_DEV_CHANNEL_DEPRECATION_INFOBAR_DELEGATE_H_ -#define BRAVE_BROWSER_INFOBARS_DEV_CHANNEL_DEPRECATION_INFOBAR_DELEGATE_H_ - -#include - -#include "brave/components/infobars/core/brave_confirm_infobar_delegate.h" - -class DevChannelDeprecationInfoBarDelegate - : public BraveConfirmInfoBarDelegate { - public: - static void CreateIfNeeded(infobars::InfoBarManager* infobar_manager); - - DevChannelDeprecationInfoBarDelegate( - const DevChannelDeprecationInfoBarDelegate&) = delete; - DevChannelDeprecationInfoBarDelegate& operator=( - const DevChannelDeprecationInfoBarDelegate&) = delete; - - ~DevChannelDeprecationInfoBarDelegate() override; - - private: - DevChannelDeprecationInfoBarDelegate(); - - // BraveConfirmInfoBarDelegate overrides: - infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; - std::u16string GetMessageText() const override; - int GetButtons() const override; - std::vector GetButtonsOrder() const override; - bool ShouldExpire(const NavigationDetails& details) const override; - std::u16string GetLinkText() const override; - GURL GetLinkURL() const override; -}; - -#endif // BRAVE_BROWSER_INFOBARS_DEV_CHANNEL_DEPRECATION_INFOBAR_DELEGATE_H_ diff --git a/browser/infobars/sources.gni b/browser/infobars/sources.gni index 6c9aab7b7a9..dd0da70d89f 100644 --- a/browser/infobars/sources.gni +++ b/browser/infobars/sources.gni @@ -15,8 +15,6 @@ if (!is_android) { "//brave/browser/infobars/brave_confirm_p3a_infobar_delegate.h", "//brave/browser/infobars/brave_sync_account_deleted_infobar_delegate.cc", "//brave/browser/infobars/brave_sync_account_deleted_infobar_delegate.h", - "//brave/browser/infobars/dev_channel_deprecation_infobar_delegate.cc", - "//brave/browser/infobars/dev_channel_deprecation_infobar_delegate.h", "//brave/browser/infobars/request_otr_infobar_delegate.cc", "//brave/browser/infobars/request_otr_infobar_delegate.h", "//brave/browser/infobars/sync_cannot_run_infobar_delegate.cc", diff --git a/chromium_src/chrome/browser/ui/startup/infobar_utils.cc b/chromium_src/chrome/browser/ui/startup/infobar_utils.cc index 389dbee66c1..fe9e9a97495 100644 --- a/chromium_src/chrome/browser/ui/startup/infobar_utils.cc +++ b/chromium_src/chrome/browser/ui/startup/infobar_utils.cc @@ -3,8 +3,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at https://mozilla.org/MPL/2.0/. */ -#include "base/check.h" -#include "brave/browser/infobars/dev_channel_deprecation_infobar_delegate.h" #include "brave/browser/ui/startup/brave_obsolete_system_infobar_delegate.h" #include "build/build_config.h" #include "chrome/browser/ui/session_crashed_bubble.h" @@ -24,7 +22,6 @@ class BraveGoogleKeysInfoBarDelegate { #define ShowIfNotOffTheRecordProfile ShowIfNotOffTheRecordProfileBrave #define GoogleApiKeysInfoBarDelegate BraveGoogleKeysInfoBarDelegate -#define AddInfoBarsIfNecessary AddInfoBarsIfNecessary_ChromiumImpl #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) #define ObsoleteSystemInfoBarDelegate BraveObsoleteSystemInfoBarDelegate @@ -36,43 +33,5 @@ class BraveGoogleKeysInfoBarDelegate { #undef ObsoleteSystemInfoBarDelegate #endif -#undef AddInfoBarsIfNecessary #undef GoogleApiKeysInfoBarDelegate #undef ShowIfNotOffTheRecordProfile - -void AddInfoBarsIfNecessary(BrowserWindowInterface* browser, - Profile* profile, - const base::CommandLine& startup_command_line, - chrome::startup::IsFirstRun is_first_run, - bool is_web_app, - bool is_post_crash_launch, - bool was_restarted) { - AddInfoBarsIfNecessary_ChromiumImpl(browser, profile, startup_command_line, - is_first_run, is_web_app, - is_post_crash_launch, was_restarted); - - TabStripModel* tab_strip_model = browser->GetTabStripModel(); - if (!browser || !profile || tab_strip_model->count() == 0) { - return; - } - - if (IsKioskModeEnabled()) { - return; - } - - if (!startup_command_line.HasSwitch(switches::kTestType) && - !IsAutomationEnabled()) { - static bool infobars_shown = false; - if (infobars_shown) { - return; - } - infobars_shown = true; - - content::WebContents* web_contents = - tab_strip_model->GetActiveWebContents(); - DCHECK(web_contents); - infobars::ContentInfoBarManager* infobar_manager = - infobars::ContentInfoBarManager::FromWebContents(web_contents); - DevChannelDeprecationInfoBarDelegate::CreateIfNeeded(infobar_manager); - } -} diff --git a/chromium_src/components/infobars/core/infobar_delegate.h b/chromium_src/components/infobars/core/infobar_delegate.h index dcaf8b07a9c..068f52ec9e5 100644 --- a/chromium_src/components/infobars/core/infobar_delegate.h +++ b/chromium_src/components/infobars/core/infobar_delegate.h @@ -17,7 +17,6 @@ WEB_DISCOVERY_INFOBAR_DELEGATE = 506, \ BRAVE_SYNC_ACCOUNT_DELETED_INFOBAR = 507, \ BRAVE_REQUEST_OTR_INFOBAR_DELEGATE = 508, \ - DEV_CHANNEL_DEPRECATION_INFOBAR_DELEGATE = 509, \ SEARCH_RESULT_AD_CLICKED_INFOBAR_DELEGATE = 510, \ NEW_TAB_TAKEOVER_INFOBAR_DELEGATE = 511, BRAVE_PSST_INFOBAR_DELEGATE = 512, @@ -25,6 +24,7 @@ // WAYBACK_MACHINE_INFOBAR_DELEGATE = 502 // SYNC_V2_MIGRATE_INFOBAR_DELEGATE = 503 // ANDROID_SYSTEM_SYNC_DISABLED_INFOBAR = 504 +// DEV_CHANNEL_DEPRECATION_INFOBAR_DELEGATE = 509 #include // IWYU pragma: export diff --git a/components/constants/url_constants.h b/components/constants/url_constants.h index 3c2df19f6df..362642eadf1 100644 --- a/components/constants/url_constants.h +++ b/components/constants/url_constants.h @@ -30,10 +30,6 @@ inline constexpr char kBraveSearchHost[] = "search.brave.com"; inline constexpr char kWidevineLearnMoreUrl[] = "https://support.brave.app/hc/en-us/articles/" "360023851591-How-do-I-view-DRM-protected-content-"; -inline constexpr char kDevChannelDeprecationLearnMoreUrl[] = - "https://support.brave.app/hc/en-us/articles/" - "17924707453581-How-do-I-migrate-my-Brave-Dev-data-to-another-channel-" - "Nightly-Beta-Release-"; inline constexpr char kDownloadBraveUrl[] = "https://www.brave.com/download"; inline constexpr char kAIChatAboutUrl[] = "https://brave.com/leo/";