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

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: A typo. 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
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/password_generation_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..56d896725b8faef4f8326181b5f113653ded4beb
--- /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 {
+ // No Account creation form is detected.
+ NO_SIGN_UP_DETECTED,
+
+ // 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,
+
+ // 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_
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/password_generation_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698