Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / browser / chromeos / login / reauth_stats.h
blob99bd159e92c6b5e18c2d82569428448b7b705834
1 // Copyright (c) 2015 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_CHROMEOS_LOGIN_REAUTH_STATS_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_REAUTH_STATS_H_
8 #include <string>
10 namespace chromeos {
12 // Track all the ways a user may be sent through the re-auth flow.
13 // This enum is used to define the buckets for an enumerated UMA histogram.
14 // Hence, existing enumerated constants should never be reordered, and all new
15 // constants should only be appended at the end of the enumeration.
16 enum ReauthReason {
17 // Default value: no reauth reasons were detected so far, or the reason was
18 // already reported.
19 NONE = 0,
21 // Legacy profile holders.
22 OTHER = 1,
24 // Password changed, revoked credentials, account deleted.
25 INVALID_TOKEN_HANDLE = 2,
27 // Incorrect password entered 3 times at the user pod.
28 INCORRECT_PASSWORD_ENTERED = 3,
30 // Incorrect password entered by a SAML user once.
31 // OS would show a tooltip offering user to complete the online sign-in.
32 INCORRECT_SAML_PASSWORD_ENTERED = 4,
34 // Device policy is set not to show user pods, which requires re-auth on every
35 // login.
36 SAML_REAUTH_POLICY = 5,
38 // Cryptohome is missing, most likely due to deletion during garbage
39 // collection.
40 MISSING_CRYPTOHOME = 6,
42 // During last login OS failed to connect to the sync with the existing RT.
43 // This could be due to account deleted, password changed, account revoked,
44 // etc.
45 SYNC_FAILED = 7,
47 // User cancelled the password change prompt when prompted by Chrome OS.
48 PASSWORD_UPDATE_SKIPPED = 8,
50 // Must be the last value in this list.
51 NUM_REAUTH_FLOW_REASONS,
54 void RecordReauthReason(const std::string& user_id, ReauthReason reason);
55 void SendReauthReason(const std::string& user_id);
57 } // namespace chromeos
59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_REAUTH_STATS_H_