| 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 namespace user_manager { |
| 11 class UserID; |
| 12 } // namespace user_manager |
| 13 |
| 10 namespace chromeos { | 14 namespace chromeos { |
| 11 | 15 |
| 12 // Track all the ways a user may be sent through the re-auth flow. | 16 // 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. | 17 // 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 | 18 // Hence, existing enumerated constants should never be reordered, and all new |
| 15 // constants should only be appended at the end of the enumeration. | 19 // constants should only be appended at the end of the enumeration. |
| 16 enum ReauthReason { | 20 enum ReauthReason { |
| 17 // Default value: no reauth reasons were detected so far, or the reason was | 21 // Default value: no reauth reasons were detected so far, or the reason was |
| 18 // already reported. | 22 // already reported. |
| 19 NONE = 0, | 23 NONE = 0, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 44 // etc. | 48 // etc. |
| 45 SYNC_FAILED = 7, | 49 SYNC_FAILED = 7, |
| 46 | 50 |
| 47 // User cancelled the password change prompt when prompted by Chrome OS. | 51 // User cancelled the password change prompt when prompted by Chrome OS. |
| 48 PASSWORD_UPDATE_SKIPPED = 8, | 52 PASSWORD_UPDATE_SKIPPED = 8, |
| 49 | 53 |
| 50 // Must be the last value in this list. | 54 // Must be the last value in this list. |
| 51 NUM_REAUTH_FLOW_REASONS, | 55 NUM_REAUTH_FLOW_REASONS, |
| 52 }; | 56 }; |
| 53 | 57 |
| 54 void RecordReauthReason(const std::string& user_id, ReauthReason reason); | 58 void RecordReauthReason(const user_manager::UserID& user_id, ReauthReason reason
); |
| 55 void SendReauthReason(const std::string& user_id); | 59 void SendReauthReason(const user_manager::UserID& user_id); |
| 56 | 60 |
| 57 } // namespace chromeos | 61 } // namespace chromeos |
| 58 | 62 |
| 59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_REAUTH_STATS_H_ | 63 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_REAUTH_STATS_H_ |
| OLD | NEW |