| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_REAUTH_STATS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_REAUTH_STATS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_REAUTH_STATS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_REAUTH_STATS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 class AccountId; | |
| 11 | |
| 12 namespace chromeos { | 10 namespace chromeos { |
| 13 | 11 |
| 14 // Track all the ways a user may be sent through the re-auth flow. | 12 // Track all the ways a user may be sent through the re-auth flow. |
| 15 // This enum is used to define the buckets for an enumerated UMA histogram. | 13 // This enum is used to define the buckets for an enumerated UMA histogram. |
| 16 // Hence, existing enumerated constants should never be reordered, and all new | 14 // Hence, existing enumerated constants should never be reordered, and all new |
| 17 // constants should only be appended at the end of the enumeration. | 15 // constants should only be appended at the end of the enumeration. |
| 18 enum ReauthReason { | 16 enum ReauthReason { |
| 19 // Default value: no reauth reasons were detected so far, or the reason was | 17 // Default value: no reauth reasons were detected so far, or the reason was |
| 20 // already reported. | 18 // already reported. |
| 21 NONE = 0, | 19 NONE = 0, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 46 // etc. | 44 // etc. |
| 47 SYNC_FAILED = 7, | 45 SYNC_FAILED = 7, |
| 48 | 46 |
| 49 // User cancelled the password change prompt when prompted by Chrome OS. | 47 // User cancelled the password change prompt when prompted by Chrome OS. |
| 50 PASSWORD_UPDATE_SKIPPED = 8, | 48 PASSWORD_UPDATE_SKIPPED = 8, |
| 51 | 49 |
| 52 // Must be the last value in this list. | 50 // Must be the last value in this list. |
| 53 NUM_REAUTH_FLOW_REASONS, | 51 NUM_REAUTH_FLOW_REASONS, |
| 54 }; | 52 }; |
| 55 | 53 |
| 56 void RecordReauthReason(const AccountId& account_id, ReauthReason reason); | 54 void RecordReauthReason(const std::string& user_id, ReauthReason reason); |
| 57 void SendReauthReason(const AccountId& account_id); | 55 void SendReauthReason(const std::string& user_id); |
| 58 | 56 |
| 59 } // namespace chromeos | 57 } // namespace chromeos |
| 60 | 58 |
| 61 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_REAUTH_STATS_H_ | 59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_REAUTH_STATS_H_ |
| OLD | NEW |