summaryrefslogtreecommitdiffstats
path: root/ui/login
diff options
context:
space:
mode:
Diffstat (limited to 'ui/login')
-rw-r--r--ui/login/account_picker/screen_account_picker.js1
-rw-r--r--ui/login/account_picker/user_pod_row.js16
2 files changed, 16 insertions, 1 deletions
diff --git a/ui/login/account_picker/screen_account_picker.js b/ui/login/account_picker/screen_account_picker.js
index 41c6a0c..61e6f54 100644
--- a/ui/login/account_picker/screen_account_picker.js
+++ b/ui/login/account_picker/screen_account_picker.js
@@ -290,6 +290,7 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
* @param {string} username Username of pod to add button
* @param {!{id: !string,
* hardlockOnClick: boolean,
+ * isTrialRun: boolean,
* tooltip: ({text: string, autoshow: boolean} | undefined)}} icon
* The icon parameters.
*/
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js
index 7bc4538..8e1da8d 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
*/