Commit 5544bae6 authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

safebrowsing: remove DialogDelegate::GetDialogButtons override

Bug: 1011446
Change-Id: I1af5ea914f2e4ffef7069f53f984c8d69cb99eac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2015607Reviewed-by: default avatarDaniel Rubery <drubery@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734561}
parent 4efc3ddb
......@@ -90,16 +90,6 @@ DeepScanningDialogViews::DeepScanningDialogViews(
kInitialUIDelay);
}
int DeepScanningDialogViews::GetDialogButtons() const {
// TODO(domfc): Add "Learn more" button on scan failure.
if (!scan_success_.has_value())
return ui::DIALOG_BUTTON_CANCEL;
else if (scan_success_.value())
return ui::DIALOG_BUTTON_NONE;
else
return ui::DIALOG_BUTTON_CANCEL;
}
base::string16 DeepScanningDialogViews::GetWindowTitle() const {
return base::string16();
}
......@@ -244,10 +234,14 @@ void DeepScanningDialogViews::Resize(int height_to_add) {
}
void DeepScanningDialogViews::SetupButtons() {
// TODO(domfc): Add "Learn more" button on scan failure.
if (!scan_success_.has_value() || !scan_success_.value()) {
DialogDelegate::set_buttons(ui::DIALOG_BUTTON_CANCEL);
DialogDelegate::set_button_label(ui::DIALOG_BUTTON_CANCEL,
GetCancelButtonText());
DialogDelegate::set_default_button(ui::DIALOG_BUTTON_NONE);
} else {
DialogDelegate::set_buttons(ui::DIALOG_BUTTON_NONE);
}
// TODO(domfc): Add "Learn more" button setup for scan failures.
......
......@@ -34,7 +34,6 @@ class DeepScanningDialogViews : public views::DialogDelegate {
content::WebContents* web_contents);
// views::DialogDelegate:
int GetDialogButtons() const override;
base::string16 GetWindowTitle() const override;
bool Cancel() override;
bool ShouldShowCloseButton() const override;
......
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