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