diff --git a/browser/ui/views/brave_first_run_dialog.cc b/browser/ui/views/brave_first_run_dialog.cc index fcd7665a10a0..753d85e94018 100644 --- a/browser/ui/views/brave_first_run_dialog.cc +++ b/browser/ui/views/brave_first_run_dialog.cc @@ -27,6 +27,7 @@ #if BUILDFLAG(IS_WIN) #include "brave/browser/brave_shell_integration.h" +#include "brave/browser/brave_shell_integration_win.h" #else #include "chrome/browser/shell_integration.h" #endif @@ -123,7 +124,13 @@ bool BraveFirstRunDialog::Accept() { #if BUILDFLAG(IS_WIN) base::MakeRefCounted() - ->StartSetAsDefault(base::NullCallback()); + ->StartSetAsDefault( + base::BindOnce([](shell_integration::DefaultWebClientState state) { + if (state == shell_integration::DefaultWebClientState::IS_DEFAULT) { + // Try to pin to taskbar when Brave is set as a default browser. + shell_integration::win::PinToTaskbar(); + } + })); #else shell_integration::SetAsDefaultBrowser(); #endif