Commit 8ee4ce24 authored by Danan S's avatar Danan S Committed by Commit Bot

If requesting parent permission, set default dialog button to OK

The OK button in this case shows the string "Ask a Parent"

Bug: 1067061
Change-Id: I1d65bd1fd6bbede0f7544ea1c4101553b421ebd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132541Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Dan S <danan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756065}
parent ea5ba9ee
...@@ -208,7 +208,16 @@ ExtensionInstallDialogView::ExtensionInstallDialogView( ...@@ -208,7 +208,16 @@ ExtensionInstallDialogView::ExtensionInstallDialogView(
int buttons = prompt_->GetDialogButtons(); int buttons = prompt_->GetDialogButtons();
DCHECK(buttons & ui::DIALOG_BUTTON_CANCEL); DCHECK(buttons & ui::DIALOG_BUTTON_CANCEL);
DialogDelegate::SetDefaultButton(ui::DIALOG_BUTTON_CANCEL); int default_button = ui::DIALOG_BUTTON_CANCEL;
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
// When we require parent permission next, we
// set the default button to OK.
if (prompt_->requires_parent_permission())
default_button = ui::DIALOG_BUTTON_OK;
#endif
DialogDelegate::SetDefaultButton(default_button);
DialogDelegate::SetButtons(buttons); DialogDelegate::SetButtons(buttons);
DialogDelegate::set_draggable(true); DialogDelegate::set_draggable(true);
if (prompt_->has_webstore_data()) { if (prompt_->has_webstore_data()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment