Fire an error if a pref used in the UI is missing once all prefs are fetched.
[chromium-blink-merge.git] / chrome / browser / signin / easy_unlock_metrics.h
blob44c2647350bac4a1c9b580dfcc56b72a23e48e8d
1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_METRICS_H_
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_METRICS_H_
8 // Tracking login events for Easy unlock metrics.
9 // This enum is used to define the buckets for an enumerated UMA histogram.
10 // Hence,
11 // (a) existing enumerated constants should never be deleted or reordered, and
12 // (b) new constants should only be appended at the end of the enumeration.
13 enum EasyUnlockAuthEvent {
14 // User is successfully authenticated using Easy Unlock.
15 EASY_UNLOCK_SUCCESS = 0,
16 // Easy Unlock failed to authenticate the user.
17 EASY_UNLOCK_FAILURE = 1,
19 // Password is used because there is no pairing data.
20 PASSWORD_ENTRY_NO_PAIRING = 2,
21 // Password is used because pairing data is changed.
22 PASSWORD_ENTRY_PAIRING_CHANGED = 3,
23 // Password is used because of user hardlock.
24 PASSWORD_ENTRY_USER_HARDLOCK = 4,
25 // Password is used because Easy unlock service is not active.
26 PASSWORD_ENTRY_SERVICE_NOT_ACTIVE = 5,
27 // Password is used because Bluetooth is not on.
28 PASSWORD_ENTRY_NO_BLUETOOTH = 6,
29 // Password is used because Easy unlock is connecting.
30 PASSWORD_ENTRY_BLUETOOTH_CONNECTING = 7,
31 // Password is used because no eligible phones found.
32 PASSWORD_ENTRY_NO_PHONE = 8,
33 // Password is used because phone could not be authenticated.
34 PASSWORD_ENTRY_PHONE_NOT_AUTHENTICATED = 9,
35 // Password is used because phone is locked.
36 PASSWORD_ENTRY_PHONE_LOCKED = 10,
37 // Password is used because phone does not have lock screen.
38 PASSWORD_ENTRY_PHONE_NOT_LOCKABLE = 11,
39 // Password is used because phone is not close enough (roughly, at least 30
40 // feet away).
41 PASSWORD_ENTRY_RSSI_TOO_LOW = 12,
42 // Password is used because phone is not supported.
43 PASSWORD_ENTRY_PHONE_UNSUPPORTED = 13,
44 // Password is used because user types in password. This is unlikely to happen
45 // though.
46 PASSWORD_ENTRY_WITH_AUTHENTICATED_PHONE = 14,
47 // Password is used because phone is not right next to the Chromebook.
48 PASSWORD_ENTRY_TX_POWER_TOO_HIGH = 15,
49 // Password is used because Easy sign-in failed.
50 PASSWORD_ENTRY_LOGIN_FAILED = 16,
51 // Password is used because pairing data is changed for a "new" Chromebook
52 // (where there was no previous pairing data).
53 PASSWORD_ENTRY_PAIRING_ADDED = 17,
54 // Password is used because there is no screenlock state handler. Most likely
55 // because EasyUnlock is disabled, e.g. Bluetooth adapter not ready.
56 PASSWORD_ENTRY_NO_SCREENLOCK_STATE_HANDLER = 18,
57 // Password is used because the phone is (a) locked, and (b) not right next to
58 // the Chromebook.
59 PASSWORD_ENTRY_PHONE_LOCKED_AND_TX_POWER_TOO_HIGH = 19,
61 EASY_UNLOCK_AUTH_EVENT_COUNT // Must be the last entry.
64 enum EasyUnlockTrialRunEvent {
65 // A trial run was initiated from the Easy Unlock setup app.
66 EASY_UNLOCK_TRIAL_RUN_EVENT_LAUNCHED = 0,
67 // The user clicked on the lock icon during the trial run.
68 EASY_UNLOCK_TRIAL_RUN_EVENT_CLICKED_LOCK_ICON = 1,
69 EASY_UNLOCK_TRIAL_RUN_EVENT_COUNT // Must be the last entry.
72 void RecordEasyUnlockSigninEvent(EasyUnlockAuthEvent event);
73 void RecordEasyUnlockScreenUnlockEvent(EasyUnlockAuthEvent event);
74 void RecordEasyUnlockTrialRunEvent(EasyUnlockTrialRunEvent event);
76 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_METRICS_H_