Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1594)

Unified Diff: chrome/browser/ui/views/external_protocol_dialog.cc

Issue 2076253002: Simplify the text in the external protocol confirmation dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update based on UI review Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..df662c7fb314f7dbcf440f52dccddbe7825bf798 100644
--- a/chrome/browser/ui/views/external_protocol_dialog.cc
+++ b/chrome/browser/ui/views/external_protocol_dialog.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/metrics/histogram_macros.h"
+#include "base/metrics/sparse_histogram.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/external_protocol/external_protocol_handler.h"
@@ -63,10 +64,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 +83,10 @@ bool ExternalProtocolDialog::Cancel() {
delegate_->DoCancel(delegate_->url(),
message_box_view_->IsCheckBoxSelected());
+ UMA_HISTOGRAM_SPARSE_SLOWLY(
Ilya Sherman 2016/10/04 01:34:45 UMA_HISTOGRAM_BOOLEAN is probably more appropriate
dominickn 2016/10/04 12:37:01 Done.
+ ExternalProtocolHandler::kRememberCheckedHistogram,
+ message_box_view_->IsCheckBoxSelected());
+
// Returning true closes the dialog.
return true;
}
@@ -96,6 +98,10 @@ bool ExternalProtocolDialog::Accept() {
UMA_HISTOGRAM_LONG_TIMES("clickjacking.launch_url",
base::TimeTicks::Now() - creation_time_);
+ UMA_HISTOGRAM_SPARSE_SLOWLY(
+ ExternalProtocolHandler::kRememberCheckedHistogram,
+ message_box_view_->IsCheckBoxSelected());
Ilya Sherman 2016/10/04 01:34:45 nit: I'd recommend adding a wrapper function for e
dominickn 2016/10/04 12:37:01 Done.
+
delegate_->DoAccept(delegate_->url(),
message_box_view_->IsCheckBoxSelected());

Powered by Google App Engine
This is Rietveld 408576698