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

Unified Diff: chrome/common/password_generation_util.h

Issue 10787023: Adding UMA stats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More comments. 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/common/password_generation_util.h
diff --git a/chrome/common/password_generation_util.h b/chrome/common/password_generation_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..9e48dd34df7009fd95f0265697513ab93d5279ac
--- /dev/null
+++ b/chrome/common/password_generation_util.h
@@ -0,0 +1,52 @@
+// 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_COMMON_PASSWORD_GENERATION_UTIL_H_
+#define CHROME_COMMON_PASSWORD_GENERATION_UTIL_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,
+};
+
+// Wrapper to store the user interactions with the password generation bubble.
+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 regenerate button.
+ bool password_regenerated;
+
+ PasswordGenerationActions();
+ ~PasswordGenerationActions();
+};
+
+void LogUserActions(PasswordGenerationActions actions);
+
+void LogPasswordGenerationEvent(PasswordGenerationEvent event);
+
+} // namespace password_generation
+
+#endif // CHROME_COMMON_PASSWORD_GENERATION_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698