Skip to content

Commit

Permalink
Fixed don't ask check of private window's closing confirm dialog does…
Browse files Browse the repository at this point in the history
…n't work

fix brave/brave-browser#24829

Setting prefs to private profile is not persisted.
Always set it to orignal profile.
  • Loading branch information
simonhong committed Aug 22, 2022
1 parent 30b0310 commit acf659c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion browser/ui/views/window_closing_confirm_dialog_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ WindowClosingConfirmDialogView::WindowClosingConfirmDialogView(
base::OnceCallback<void(bool)> response_callback)
: browser_(browser),
response_callback_(std::move(response_callback)),
prefs_(browser->profile()->GetPrefs()) {
prefs_(browser->profile()->GetOriginalProfile()->GetPrefs()) {
set_should_ignore_snapping(true);
SetButtonLabel(ui::DIALOG_BUTTON_OK,
l10n_util::GetStringUTF16(
Expand Down

0 comments on commit acf659c

Please sign in to comment.