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

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: Fix the test. 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..7111a83314705918c13b37f64818e87e5f4e6f4a
--- /dev/null
+++ b/chrome/browser/ui/password_generation_status.h
@@ -0,0 +1,75 @@
+// 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_
+
+#include <string>
+
+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
+ // 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,
+};
+
+// Data structure to store various password generation status .
+struct PasswordGenerationStatus {
Garrett Casto 2012/07/18 17:20:03 Given the other suggestions, can you drop the gene
zysxqn 2012/07/18 19:16:46 Done.
+ // Store the generated password.
+ std::string generated_password;
+
+ // 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.
+ bool password_regenerated;
+
+ PasswordGenerationStatus();
+ ~PasswordGenerationStatus();
+};
+
+} // namespace password_generation
+
+#endif // CHROME_BROWSER_UI_PASSWORD_GENERATION_STATUS_H_

Powered by Google App Engine
This is Rietveld 408576698