Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(896)

Side by Side Diff: components/autofill/common/password_generation_util.h

Issue 13928035: WIP Component build of autofill Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make windows compiling Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_AUTOFILL_COMMON_PASSWORD_GENERATION_UTIL_H_ 5 #ifndef COMPONENTS_AUTOFILL_COMMON_PASSWORD_GENERATION_UTIL_H_
6 #define COMPONENTS_AUTOFILL_COMMON_PASSWORD_GENERATION_UTIL_H_ 6 #define COMPONENTS_AUTOFILL_COMMON_PASSWORD_GENERATION_UTIL_H_
7 7
8 #include "components/autofill/common/autofill_export.h"
9
8 namespace autofill { 10 namespace autofill {
9 namespace password_generation { 11 namespace password_generation {
10 12
11 // Enumerates various events related to the password generation process. 13 // Enumerates various events related to the password generation process.
12 enum PasswordGenerationEvent { 14 enum PasswordGenerationEvent {
13 // No Account creation form is detected. 15 // No Account creation form is detected.
14 NO_SIGN_UP_DETECTED, 16 NO_SIGN_UP_DETECTED,
15 17
16 // Account creation form is detected. 18 // Account creation form is detected.
17 SIGN_UP_DETECTED, 19 SIGN_UP_DETECTED,
18 20
19 // Password generation icon is shown inside the first password field. 21 // Password generation icon is shown inside the first password field.
20 ICON_SHOWN, 22 ICON_SHOWN,
21 23
22 // Password generation bubble is shown after user clicks on the icon. 24 // Password generation bubble is shown after user clicks on the icon.
23 BUBBLE_SHOWN, 25 BUBBLE_SHOWN,
24 26
25 // Number of enum entries, used for UMA histogram reporting macros. 27 // Number of enum entries, used for UMA histogram reporting macros.
26 EVENT_ENUM_COUNT 28 EVENT_ENUM_COUNT
27 }; 29 };
28 30
29 // Wrapper to store the user interactions with the password generation bubble. 31 // Wrapper to store the user interactions with the password generation bubble.
30 struct PasswordGenerationActions { 32 struct AUTOFILL_EXPORT PasswordGenerationActions {
31 // Whether the user has clicked on the learn more link. 33 // Whether the user has clicked on the learn more link.
32 bool learn_more_visited; 34 bool learn_more_visited;
33 35
34 // Whether the user has accepted the generated password. 36 // Whether the user has accepted the generated password.
35 bool password_accepted; 37 bool password_accepted;
36 38
37 // Whether the user has manually edited password entry. 39 // Whether the user has manually edited password entry.
38 bool password_edited; 40 bool password_edited;
39 41
40 // Whether the user has clicked on the regenerate button. 42 // Whether the user has clicked on the regenerate button.
41 bool password_regenerated; 43 bool password_regenerated;
42 44
43 PasswordGenerationActions(); 45 PasswordGenerationActions();
44 ~PasswordGenerationActions(); 46 ~PasswordGenerationActions();
45 }; 47 };
46 48
47 void LogUserActions(PasswordGenerationActions actions); 49 void AUTOFILL_EXPORT LogUserActions(PasswordGenerationActions actions);
48 50
49 void LogPasswordGenerationEvent(PasswordGenerationEvent event); 51 void LogPasswordGenerationEvent(PasswordGenerationEvent event);
50 52
51 // Enumerates user actions after password generation bubble is shown. 53 // Enumerates user actions after password generation bubble is shown.
52 // These are visible for testing purposes. 54 // These are visible for testing purposes.
53 enum UserAction { 55 enum UserAction {
54 // User closes the bubble without any meaningful actions (e.g. use backspace 56 // User closes the bubble without any meaningful actions (e.g. use backspace
55 // key, close the bubble, click outside the bubble, etc). 57 // key, close the bubble, click outside the bubble, etc).
56 IGNORE_FEATURE, 58 IGNORE_FEATURE,
57 59
(...skipping 10 matching lines...) Expand all
68 ACCEPT_AFTER_EDITING, 70 ACCEPT_AFTER_EDITING,
69 71
70 // Number of enum entries, used for UMA histogram reporting macros. 72 // Number of enum entries, used for UMA histogram reporting macros.
71 ACTION_ENUM_COUNT 73 ACTION_ENUM_COUNT
72 }; 74 };
73 75
74 } // namespace password_generation 76 } // namespace password_generation
75 } // namespace autofill 77 } // namespace autofill
76 78
77 #endif // COMPONENTS_AUTOFILL_COMMON_PASSWORD_GENERATION_UTIL_H_ 79 #endif // COMPONENTS_AUTOFILL_COMMON_PASSWORD_GENERATION_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698