diff options
author | isherman <isherman@chromium.org> | 2015-02-20 03:06:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-20 11:07:23 +0000 |
commit | 8afaf6188bfdbe912f815f344b7fd8752efff74d (patch) | |
tree | 2d232f5fcd7ea824add52a7f4760ba06bbcd6475 /ui/login | |
parent | d4f1c6ee81fba9ad6c6dbc4a09558321bbc1d065 (diff) | |
download | chromium_src-8afaf6188bfdbe912f815f344b7fd8752efff74d.zip chromium_src-8afaf6188bfdbe912f815f344b7fd8752efff74d.tar.gz chromium_src-8afaf6188bfdbe912f815f344b7fd8752efff74d.tar.bz2 |
[Smart Lock] Measure clicks on the lock icon during Easy Unlock's trial run.
BUG=450508
TEST=none
R=nkostylev@chromium.org, tengs@chromium.org
Review URL: https://codereview.chromium.org/935303002
Cr-Commit-Position: refs/heads/master@{#317283}
Diffstat (limited to 'ui/login')
-rw-r--r-- | ui/login/account_picker/screen_account_picker.js | 1 | ||||
-rw-r--r-- | ui/login/account_picker/user_pod_row.js | 16 |
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 */ |