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

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: Fix ChromeOS compile Created 4 years, 2 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..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());

Powered by Google App Engine
This is Rietveld 408576698