diff --git a/browser/ui/session_crashed_bubble_brave.cc b/browser/ui/session_crashed_bubble_brave.cc index b2769caa796..26356a4a960 100644 --- a/browser/ui/session_crashed_bubble_brave.cc +++ b/browser/ui/session_crashed_bubble_brave.cc @@ -5,16 +5,18 @@ #include "brave/browser/metrics/metrics_reporting_util.h" #include "brave/browser/ui/browser_dialogs.h" +#include "chrome/browser/ui/browser_window/public/browser_window_interface.h" #include "chrome/browser/ui/session_crashed_bubble.h" // static void SessionCrashedBubble::ShowIfNotOffTheRecordProfileBrave( - Browser* browser, + BrowserWindowInterface* browser, bool skip_tab_checking) { // If crash report permission ask dialog is launched, tab restore bubble will // be shown after closing aks dialog. if (ShouldShowCrashReportPermissionAskDialog()) { - brave::ShowCrashReportPermissionAskDialog(browser); + brave::ShowCrashReportPermissionAskDialog( + browser->GetBrowserForMigrationOnly()); return; } diff --git a/chromium_src/chrome/browser/ui/session_crashed_bubble.h b/chromium_src/chrome/browser/ui/session_crashed_bubble.h index f8bd2b1d3ff..51742f38dc2 100644 --- a/chromium_src/chrome/browser/ui/session_crashed_bubble.h +++ b/chromium_src/chrome/browser/ui/session_crashed_bubble.h @@ -6,8 +6,9 @@ #ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_SESSION_CRASHED_BUBBLE_H_ #define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_SESSION_CRASHED_BUBBLE_H_ -#define ShowIfNotOffTheRecordProfile \ - ShowIfNotOffTheRecordProfileBrave(Browser* browser, bool skip_tab_checking); \ +#define ShowIfNotOffTheRecordProfile \ + ShowIfNotOffTheRecordProfileBrave(BrowserWindowInterface* browser, \ + bool skip_tab_checking); \ static void ShowIfNotOffTheRecordProfile #include // IWYU pragma: export diff --git a/chromium_src/chrome/browser/ui/startup/infobar_utils.cc b/chromium_src/chrome/browser/ui/startup/infobar_utils.cc index 68b39dcccdb..389dbee66c1 100644 --- a/chromium_src/chrome/browser/ui/startup/infobar_utils.cc +++ b/chromium_src/chrome/browser/ui/startup/infobar_utils.cc @@ -40,7 +40,7 @@ class BraveGoogleKeysInfoBarDelegate { #undef GoogleApiKeysInfoBarDelegate #undef ShowIfNotOffTheRecordProfile -void AddInfoBarsIfNecessary(Browser* browser, +void AddInfoBarsIfNecessary(BrowserWindowInterface* browser, Profile* profile, const base::CommandLine& startup_command_line, chrome::startup::IsFirstRun is_first_run, @@ -51,7 +51,8 @@ void AddInfoBarsIfNecessary(Browser* browser, is_first_run, is_web_app, is_post_crash_launch, was_restarted); - if (!browser || !profile || browser->tab_strip_model()->count() == 0) { + TabStripModel* tab_strip_model = browser->GetTabStripModel(); + if (!browser || !profile || tab_strip_model->count() == 0) { return; } @@ -68,7 +69,7 @@ void AddInfoBarsIfNecessary(Browser* browser, infobars_shown = true; content::WebContents* web_contents = - browser->tab_strip_model()->GetActiveWebContents(); + tab_strip_model->GetActiveWebContents(); DCHECK(web_contents); infobars::ContentInfoBarManager* infobar_manager = infobars::ContentInfoBarManager::FromWebContents(web_contents);