Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 /** | |
| 6 * @fileoverview Constants used for logging the pin unlock setup uma. | |
| 7 */ | |
| 8 | |
| 9 /** | |
| 10 * Name of the pin unlock setup uma histogram. | |
| 11 * @type {string} | |
| 12 */ | |
| 13 var PinUnlockUmaHistogramName = 'Settings.PinUnlockSetup'; | |
| 14 | |
| 15 /** | |
| 16 * Stages the user can enter while setting up pin unlock. | |
| 17 * @enum {number} | |
| 18 */ | |
| 19 var LockScreenProgress = { | |
| 20 START_SCREEN_LOCK: 0, | |
| 21 ENTER_PASSWORD_CORRECTLY: 1, | |
| 22 CHOOSE_PIN_OR_PASSWORD: 2, | |
| 23 ENTER_PIN: 3, | |
| 24 CONFIRM_PIN: 4, | |
| 25 MAX_BUCKET: 5 | |
| 26 }; | |
| 27 | |
| 28 /** | |
| 29 * Helper function to send the progress of the pin setup to be recorded in the | |
| 30 * histogram. | |
| 31 * @param {number} currentProgress | |
|
jdufault
2016/09/13 19:36:35
@param {LockScreenProgress} currentProgress
sammiequon
2016/09/13 21:34:57
Done.
| |
| 32 */ | |
| 33 var recordLockScreenProgress = function(currentProgress) { | |
| 34 if (currentProgress >= LockScreenProgress.MAX_BUCKET) | |
|
jdufault
2016/09/13 19:36:35
Log an error?
sammiequon
2016/09/13 21:34:58
Done.
| |
| 35 return; | |
| 36 chrome.send('metricsHandler:recordInHistogram', | |
| 37 [PinUnlockUmaHistogramName, currentProgress, | |
| 38 LockScreenProgress.MAX_BUCKET]); | |
| 39 }; | |
| OLD | NEW |