| Index: chrome/browser/ui/views/external_protocol_dialog.cc
|
| diff --git a/chrome/browser/ui/views/external_protocol_dialog.cc b/chrome/browser/ui/views/external_protocol_dialog.cc
|
| index 6a820aa36a4359a507f87826b9f3b8601d076aad..60b15cfe11a6d74359538c3ba7d8d6f4818a6058 100644
|
| --- a/chrome/browser/ui/views/external_protocol_dialog.cc
|
| +++ b/chrome/browser/ui/views/external_protocol_dialog.cc
|
| @@ -8,7 +8,6 @@
|
|
|
| #include "base/metrics/histogram_macros.h"
|
| #include "base/strings/string_util.h"
|
| -#include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/external_protocol/external_protocol_handler.h"
|
| #include "chrome/browser/tab_contents/tab_util.h"
|
| #include "chrome/browser/ui/external_protocol_dialog_delegate.h"
|
| @@ -63,10 +62,7 @@ int ExternalProtocolDialog::GetDefaultDialogButton() const {
|
|
|
| base::string16 ExternalProtocolDialog::GetDialogButtonLabel(
|
| ui::DialogButton button) const {
|
| - if (button == ui::DIALOG_BUTTON_OK)
|
| - return l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_OK_BUTTON_TEXT);
|
| - else
|
| - return l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_CANCEL_BUTTON_TEXT);
|
| + return delegate_->GetDialogButtonLabel(button);
|
| }
|
|
|
| base::string16 ExternalProtocolDialog::GetWindowTitle() const {
|
| @@ -85,6 +81,9 @@ bool ExternalProtocolDialog::Cancel() {
|
| delegate_->DoCancel(delegate_->url(),
|
| message_box_view_->IsCheckBoxSelected());
|
|
|
| + ExternalProtocolHandler::RecordMetrics(
|
| + message_box_view_->IsCheckBoxSelected());
|
| +
|
| // Returning true closes the dialog.
|
| return true;
|
| }
|
| @@ -96,6 +95,9 @@ bool ExternalProtocolDialog::Accept() {
|
| UMA_HISTOGRAM_LONG_TIMES("clickjacking.launch_url",
|
| base::TimeTicks::Now() - creation_time_);
|
|
|
| + ExternalProtocolHandler::RecordMetrics(
|
| + message_box_view_->IsCheckBoxSelected());
|
| +
|
| delegate_->DoAccept(delegate_->url(),
|
| message_box_view_->IsCheckBoxSelected());
|
|
|
|
|