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

Side by Side Diff: chrome/browser/ui/password_generation_status.h

Issue 10787023: Adding UMA stats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't update histograms in the renderer. Created 8 years, 5 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
(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_BROWSER_UI_PASSWORD_GENERATION_STATUS_H_
6 #define CHROME_BROWSER_UI_PASSWORD_GENERATION_STATUS_H_
7
8 namespace password_generation {
9
10 // Enumerates various events related to the password generation process.
11 enum PasswordGenerationEvent {
12 // Account creation form is detected.
13 SIGN_UP_DETECTED,
14
15 // Password generation icon is shown inside the first password field.
16 ICON_SHOWN,
17
18 // Password generation bubble is shown after user clicks on the icon.
19 BUBBLE_SHOWN,
20
21 // Generated password is submitted.
22 SUBMITTED,
23
24 // Number of enum entries, used for UMA histogram reporting macros.
25 EVENT_ENUM_COUNT,
26 };
27
28 // Enumerates user actions after password generation bubble is shown.
29 enum UserAction {
30 // User closes the bubble without any meaningful actions (e.g. use backspace
31 // key, close the bubble, click outside the bubble, etc).
32 IGNORE,
33
34 // User navigates to the learn more page. Note that in the current
35 // implementation this will result to closing the bubble so this action
Ilya Sherman 2012/07/18 20:48:56 nit: "will result to" -> "will result in"
zysxqn 2012/07/18 22:46:17 Done.
36 // doesn't overlap with the following two actions.
37 LEARN_MORE,
38
39 // User accepts the generated password without manually editing it (but
40 // including changing it through the regenerate button).
41 ACCEPT_ORIGINAL_PASSWORD,
42
43 // User accepts the gererated password after manually editing it.
44 ACCEPT_AFTER_EDITING,
45
46 // Number of enum entries, used for UMA histogram reporting macros.
47 ACTION_ENUM_COUNT,
48 };
Ilya Sherman 2012/07/18 20:48:56 nit: Can this enum be tucked into an anonymous nam
zysxqn 2012/07/18 22:46:17 Feel that putting it in the header file will make
Ilya Sherman 2012/07/18 23:13:23 The primary description for the histogram actually
zysxqn 2012/07/18 23:21:29 Done.
49
50 // Data structure to store various password generation status .
Ilya Sherman 2012/07/18 20:48:57 Optional nit: Perhaps something more like "Wrapper
zysxqn 2012/07/18 22:46:17 hmm, changed to "Wrapper to store user interaction
51 struct PasswordGenerationActions {
52 // Whether the user has clicked on the learn more link.
53 bool learn_more_visited;
54
55 // Whether the user has accepted the generated password.
56 bool password_accepted;
57
58 // Whether the user has manually edited password entry.
59 bool password_edited;
60
61 // Whether the user has clicked on the regereated button.
Ilya Sherman 2012/07/18 20:48:57 nit: "regereated" -> "regenerate"
zysxqn 2012/07/18 22:46:17 Done.
62 bool password_regenerated;
63
64 PasswordGenerationActions();
65 ~PasswordGenerationActions();
66 };
67
68 void UpdateUserActionsHistogram(PasswordGenerationActions actions);
Ilya Sherman 2012/07/18 20:48:57 Optional nit: Perhaps "LogPasswordGenerationUserAc
zysxqn 2012/07/18 22:46:17 Done.
69
70 void UpdateEventsHistogram(PasswordGenerationEvent event);
Ilya Sherman 2012/07/18 20:48:57 Optional nit: Perhaps "LogPasswordGenerationEvent"
zysxqn 2012/07/18 22:46:17 Done.
71
72 } // namespace password_generation
73
74 #endif // CHROME_BROWSER_UI_PASSWORD_GENERATION_STATUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698