| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 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. |
| 4 |
| 5 #ifndef CHROME_COMMON_PASSWORD_GENERATION_UTIL_H_ |
| 6 #define CHROME_COMMON_PASSWORD_GENERATION_UTIL_H_ |
| 7 |
| 8 namespace password_generation { |
| 9 |
| 10 // Enumerates various events related to the password generation process. |
| 11 enum PasswordGenerationEvent { |
| 12 // No Account creation form is detected. |
| 13 NO_SIGN_UP_DETECTED, |
| 14 |
| 15 // Account creation form is detected. |
| 16 SIGN_UP_DETECTED, |
| 17 |
| 18 // Password generation icon is shown inside the first password field. |
| 19 ICON_SHOWN, |
| 20 |
| 21 // Password generation bubble is shown after user clicks on the icon. |
| 22 BUBBLE_SHOWN, |
| 23 |
| 24 // Number of enum entries, used for UMA histogram reporting macros. |
| 25 EVENT_ENUM_COUNT |
| 26 }; |
| 27 |
| 28 // Wrapper to store the user interactions with the password generation bubble. |
| 29 struct PasswordGenerationActions { |
| 30 // Whether the user has clicked on the learn more link. |
| 31 bool learn_more_visited; |
| 32 |
| 33 // Whether the user has accepted the generated password. |
| 34 bool password_accepted; |
| 35 |
| 36 // Whether the user has manually edited password entry. |
| 37 bool password_edited; |
| 38 |
| 39 // Whether the user has clicked on the regenerate button. |
| 40 bool password_regenerated; |
| 41 |
| 42 PasswordGenerationActions(); |
| 43 ~PasswordGenerationActions(); |
| 44 }; |
| 45 |
| 46 void LogUserActions(PasswordGenerationActions actions); |
| 47 |
| 48 void LogPasswordGenerationEvent(PasswordGenerationEvent event); |
| 49 |
| 50 } // namespace password_generation |
| 51 |
| 52 #endif // CHROME_COMMON_PASSWORD_GENERATION_UTIL_H_ |
| OLD | NEW |