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

Unified Diff: chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h

Issue 2535043002: Add UMA metrics to measure the dismissal cause of dialogs. (Closed)
Patch Set: nits Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h
diff --git a/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h b/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h
index 84679bd185bd111f89a1ebf7d927cea451883867..95d8b6cf2403c42d1d69f6da62acbcfd3a865db9 100644
--- a/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h
+++ b/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h
@@ -64,6 +64,9 @@ class JavaScriptDialogTabHelper
private:
friend class content::WebContentsUserData<JavaScriptDialogTabHelper>;
+ enum class DismissalCause;
+
+ void LogDialogDismissalCause(DismissalCause cause);
// Wrapper around a DialogClosedCallback so that we can intercept it before
// passing it onto the original callback.
@@ -73,13 +76,18 @@ class JavaScriptDialogTabHelper
void CloseDialog(bool suppress_callback,
bool success,
- const base::string16& user_input);
+ const base::string16& user_input,
+ DismissalCause cause);
void ClearDialogInfo();
// The dialog being displayed on the observed WebContents.
base::WeakPtr<JavaScriptDialog> dialog_;
+ // The type of dialog being displayed. Only valid when |dialog_| is non-null.
+ content::JavaScriptMessageType message_type_ =
+ content::JavaScriptMessageType::JAVASCRIPT_MESSAGE_TYPE_ALERT;
+
// The callback provided for when the dialog is closed. Usually the dialog
// itself calls it, but in the cases where the dialog is closed not by the
// user's input but by a call to |CloseDialog|, this class will call it.
« no previous file with comments | « no previous file | chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698