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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/password_generation_status.h
diff --git a/chrome/browser/ui/password_generation_status.h b/chrome/browser/ui/password_generation_status.h
new file mode 100644
index 0000000000000000000000000000000000000000..b075100c0b4de5e746a3d018d505582f937dc144
--- /dev/null
+++ b/chrome/browser/ui/password_generation_status.h
@@ -0,0 +1,74 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_PASSWORD_GENERATION_STATUS_H_
+#define CHROME_BROWSER_UI_PASSWORD_GENERATION_STATUS_H_
+
+namespace password_generation {
+
+// Enumerates various events related to the password generation process.
+enum PasswordGenerationEvent {
+ // Account creation form is detected.
+ SIGN_UP_DETECTED,
+
+ // Password generation icon is shown inside the first password field.
+ ICON_SHOWN,
+
+ // Password generation bubble is shown after user clicks on the icon.
+ BUBBLE_SHOWN,
+
+ // Generated password is submitted.
+ SUBMITTED,
+
+ // Number of enum entries, used for UMA histogram reporting macros.
+ EVENT_ENUM_COUNT,
+};
+
+// Enumerates user actions after password generation bubble is shown.
+enum UserAction {
+ // User closes the bubble without any meaningful actions (e.g. use backspace
+ // key, close the bubble, click outside the bubble, etc).
+ IGNORE,
+
+ // User navigates to the learn more page. Note that in the current
+ // 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.
+ // doesn't overlap with the following two actions.
+ LEARN_MORE,
+
+ // User accepts the generated password without manually editing it (but
+ // including changing it through the regenerate button).
+ ACCEPT_ORIGINAL_PASSWORD,
+
+ // User accepts the gererated password after manually editing it.
+ ACCEPT_AFTER_EDITING,
+
+ // Number of enum entries, used for UMA histogram reporting macros.
+ ACTION_ENUM_COUNT,
+};
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.
+
+// 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
+struct PasswordGenerationActions {
+ // Whether the user has clicked on the learn more link.
+ bool learn_more_visited;
+
+ // Whether the user has accepted the generated password.
+ bool password_accepted;
+
+ // Whether the user has manually edited password entry.
+ bool password_edited;
+
+ // 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.
+ bool password_regenerated;
+
+ PasswordGenerationActions();
+ ~PasswordGenerationActions();
+};
+
+void UpdateUserActionsHistogram(PasswordGenerationActions actions);
Ilya Sherman 2012/07/18 20:48:57 Optional nit: Perhaps "LogPasswordGenerationUserAc
zysxqn 2012/07/18 22:46:17 Done.
+
+void UpdateEventsHistogram(PasswordGenerationEvent event);
Ilya Sherman 2012/07/18 20:48:57 Optional nit: Perhaps "LogPasswordGenerationEvent"
zysxqn 2012/07/18 22:46:17 Done.
+
+} // namespace password_generation
+
+#endif // CHROME_BROWSER_UI_PASSWORD_GENERATION_STATUS_H_

Powered by Google App Engine
This is Rietveld 408576698