summaryrefslogtreecommitdiffstats
path: root/components/password_manager
diff options
context:
space:
mode:
authormkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-08 10:33:43 +0000
committermkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-08 10:33:43 +0000
commit2d84bbcfcc9184ae05f92c565656e58e37606283 (patch)
treeb92820e60960acb0aaac3e9504f6f3e12368b725 /components/password_manager
parent8072a226625eda5b991fd5027964c41cb3918d47 (diff)
downloadchromium_src-2d84bbcfcc9184ae05f92c565656e58e37606283.zip
chromium_src-2d84bbcfcc9184ae05f92c565656e58e37606283.tar.gz
chromium_src-2d84bbcfcc9184ae05f92c565656e58e37606283.tar.bz2
Password bubble: Merge bubble and infobar response histogram.
We can more easily evaluate the impact of the bubble UI on user behavior if we're evaluating the changes to a single histogram, rather than poking around at multiple in the hopes of understanding correlations. BUG=300149 Review URL: https://codereview.chromium.org/227613002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262368 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/password_manager')
-rw-r--r--components/password_manager/core/browser/password_manager_metrics_util.cc28
-rw-r--r--components/password_manager/core/browser/password_manager_metrics_util.h39
2 files changed, 67 insertions, 0 deletions
diff --git a/components/password_manager/core/browser/password_manager_metrics_util.cc b/components/password_manager/core/browser/password_manager_metrics_util.cc
index b7ac87c..6026705 100644
--- a/components/password_manager/core/browser/password_manager_metrics_util.cc
+++ b/components/password_manager/core/browser/password_manager_metrics_util.cc
@@ -115,4 +115,32 @@ std::string GroupIdToString(size_t group_id) {
return std::string();
}
+void LogUIDismissalReason(ResponseType type) {
+ UIDismissalReason reason = NO_DIRECT_INTERACTION;
+ switch (type) {
+ case NO_RESPONSE:
+ reason = NO_DIRECT_INTERACTION;
+ break;
+ case REMEMBER_PASSWORD:
+ reason = CLICKED_SAVE;
+ break;
+ case NEVER_REMEMBER_PASSWORD:
+ reason = CLICKED_NEVER;
+ break;
+ case INFOBAR_DISMISSED:
+ reason = CLICKED_NOPE;
+ break;
+ case NUM_RESPONSE_TYPES:
+ NOTREACHED();
+ break;
+ }
+ LogUIDismissalReason(reason);
+}
+
+void LogUIDismissalReason(UIDismissalReason reason) {
+ UMA_HISTOGRAM_ENUMERATION("PasswordManager.UIDismissalReason",
+ reason,
+ NUM_UI_RESPONSES);
+}
+
} // namespace password_manager_metrics_util
diff --git a/components/password_manager/core/browser/password_manager_metrics_util.h b/components/password_manager/core/browser/password_manager_metrics_util.h
index e3166af..7ce1da1 100644
--- a/components/password_manager/core/browser/password_manager_metrics_util.h
+++ b/components/password_manager/core/browser/password_manager_metrics_util.h
@@ -11,6 +11,33 @@ class PrefService;
namespace password_manager_metrics_util {
+// Metrics: "PasswordManager.InfoBarResponse"
+enum ResponseType {
+ NO_RESPONSE = 0,
+ REMEMBER_PASSWORD,
+ NEVER_REMEMBER_PASSWORD,
+ INFOBAR_DISMISSED,
+ NUM_RESPONSE_TYPES,
+};
+
+// Metrics: "PasswordManager.UIResponse"
+enum UIDismissalReason {
+ // We use this to mean both "Bubble lost focus" and "No interaction with the
+ // infobar", depending on which experiment is active.
+ NO_DIRECT_INTERACTION = 0,
+ CLICKED_SAVE,
+ CLICKED_NOPE,
+ CLICKED_NEVER,
+ CLICKED_MANAGE,
+ CLICKED_DONE,
+ NUM_UI_RESPONSES,
+
+ // If we add the omnibox icon _without_ intending to display the bubble,
+ // we actually call Close() after creating the bubble view. We don't want
+ // that to count in the metrics, so we need this placeholder value.
+ NOT_DISPLAYED
+};
+
// We monitor the performance of the save password heuristic for a handful of
// domains. For privacy reasons we are not reporting UMA signals by domain, but
// by a domain group. A domain group can contain multiple domains, and a domain
@@ -41,6 +68,18 @@ void LogUMAHistogramBoolean(const std::string& name, bool sample);
// |group_id| corresponds to an unmonitored domain returns an empty string.
std::string GroupIdToString(size_t group_id);
+// Log the |reason| a user dismissed the password manager UI.
+void LogUIDismissalReason(UIDismissalReason reason);
+
+// Given a ResponseType, log the appropriate UIResponse. We'll use this
+// mapping to migrate from "PasswordManager.InfoBarResponse" to
+// "PasswordManager.UIDismissalReason" so we can accurately evaluate the
+// impact of the bubble UI.
+//
+// TODO(mkwst): Drop this (and the infobar metric itself) once the new metric
+// has rolled out to stable.
+void LogUIDismissalReason(ResponseType type);
+
} // namespace password_manager_metrics_util
#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_METRICS_UTIL_H_