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

Unified Diff: ui/login/account_picker/user_pod_row.js

Issue 935303002: [Smart Lock] Measure clicks on the lock icon during Easy Unlock's trial run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « ui/login/account_picker/screen_account_picker.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/login/account_picker/user_pod_row.js
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js
index 7bc4538576c83fe1bd390d0f57c6c673918ec887..8e1da8d1b7872e482a66f2796bcf8add29a4a572 100644
--- a/ui/login/account_picker/user_pod_row.js
+++ b/ui/login/account_picker/user_pod_row.js
@@ -2427,6 +2427,7 @@ cr.define('login', function() {
* @param {string} username Username of pod to add button
* @param {!{id: !string,
* hardlockOnClick: boolean,
+ * isTrialRun: boolean,
* ariaLabel: string | undefined,
* tooltip: ({text: string, autoshow: boolean} | undefined)}} icon
* The icon parameters.
@@ -2445,7 +2446,10 @@ cr.define('login', function() {
if (icon.id)
pod.customIconElement.setIcon(icon.id);
- if (icon.hardlockOnClick) {
+ if (icon.isTrialRun) {
+ pod.customIconElement.setInteractive(
+ this.onDidClickLockIconDuringTrialRun_.bind(this, username));
+ } else if (icon.hardlockOnClick) {
pod.customIconElement.setInteractive(
this.hardlockUserPod_.bind(this, username));
} else {
@@ -2478,6 +2482,16 @@ cr.define('login', function() {
},
/**
+ * Records a metric indicating that the user clicked on the lock icon during
+ * the trial run for Easy Unlock.
+ * @param {!string} username The user's username.
+ * @private
+ */
+ onDidClickLockIconDuringTrialRun_: function(username) {
+ chrome.send('recordClickOnLockIcon', [username]);
+ },
+
+ /**
* Hides the custom icon in the user pod added by showUserPodCustomIcon().
* @param {string} username Username of pod to remove button
*/
« no previous file with comments | « ui/login/account_picker/screen_account_picker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698