Commit 26b98675 authored by Greg Thompson's avatar Greg Thompson Committed by Commit Bot

Fix usage stats collection in relaunch required dialog.

Log the cancel action in a DialogDelegate::Cancel() override rather than
a Close() override.

BUG=none
R=bsep@chromium.org

Change-Id: If4f888bc7530b880c34eb6c4ec8e18d2f61f159f
Reviewed-on: https://chromium-review.googlesource.com/1233736
Commit-Queue: Greg Thompson <grt@chromium.org>
Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592738}
parent bb9a9696
......@@ -55,6 +55,12 @@ void RelaunchRequiredDialogView::SetDeadline(base::TimeTicks deadline) {
relaunch_required_timer_.SetDeadline(deadline);
}
bool RelaunchRequiredDialogView::Cancel() {
base::RecordAction(base::UserMetricsAction("RelaunchRequired_Close"));
return true;
}
bool RelaunchRequiredDialogView::Accept() {
base::RecordAction(base::UserMetricsAction("RelaunchRequired_Accept"));
......@@ -65,12 +71,6 @@ bool RelaunchRequiredDialogView::Accept() {
return false;
}
bool RelaunchRequiredDialogView::Close() {
base::RecordAction(base::UserMetricsAction("RelaunchRequired_Close"));
return true;
}
int RelaunchRequiredDialogView::GetDefaultDialogButton() const {
// Do not focus either button so that the user doesn't relaunch or dismiss by
// accident if typing when the dialog appears.
......
......@@ -39,8 +39,8 @@ class RelaunchRequiredDialogView : views::DialogDelegateView {
void SetDeadline(base::TimeTicks deadline);
// views::DialogDelegateView:
bool Cancel() override;
bool Accept() override;
bool Close() override;
int GetDefaultDialogButton() const override;
base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
ui::ModalType GetModalType() 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