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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementScreenHelper.java

Issue 304983005: [Android][Mirror] UMA stats for Account management screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase. Created 6 years, 7 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 | « no previous file | chrome/browser/android/signin/account_management_screen_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementScreenHelper.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementScreenHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementScreenHelper.java
index 044cc22d05c47e0ef70a0a7b4fc866c5af3ee1e9..2ac1fe0c20843f1368c9bd696621148b86bcd3a0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementScreenHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementScreenHelper.java
@@ -16,6 +16,29 @@ import org.chromium.chrome.browser.profiles.Profile;
public class AccountManagementScreenHelper {
private static AccountManagementScreenManager sManager;
+ /*
+ * TODO(aruslan): http://crbug.com/379987 Move to a generator.
+ * Enum for tracking user interactions with the account management menu
+ * on Android.
+ * This must match enum ProfileAndroidAccountManagementMenu in profile_metrics.h.
+ */
+ // User arrived at the Account management screen.
+ public static final int ACCOUNT_MANAGEMENT_MENU_VIEW = 0;
+ // User arrived at the Account management screen, and clicked Add account.
+ public static final int ACCOUNT_MANAGEMENT_MENU_ADD_ACCOUNT = 1;
+ // User arrived at the Account management screen, and clicked Go incognito.
+ public static final int ACCOUNT_MANAGEMENT_MENU_GO_INCOGNITO = 2;
+ // User arrived at the Account management screen, and clicked on primary.
+ public static final int ACCOUNT_MANAGEMENT_MENU_CLICK_PRIMARY_ACCOUNT = 3;
+ // User arrived at the Account management screen, and clicked on secondary.
+ public static final int ACCOUNT_MANAGEMENT_MENU_CLICK_SECONDARY_ACCOUNT = 4;
+ // User arrived at the Account management screen, toggled Chrome signout.
+ public static final int ACCOUNT_MANAGEMENT_MENU_TOGGLE_SIGNOUT = 5;
+ // User toggled Chrome signout, and clicked Signout.
+ public static final int ACCOUNT_MANAGEMENT_MENU_SIGNOUT_SIGNOUT = 6;
+ // User toggled Chrome signout, and clicked Cancel.
+ public static final int ACCOUNT_MANAGEMENT_MENU_SIGNOUT_CANCEL = 7;
+
/**
* The screen manager interface.
*/
@@ -24,8 +47,10 @@ public class AccountManagementScreenHelper {
* Opens the account management UI screen.
* @param applicationContext The application context.
* @param profile The user profile.
+ * @param gaiaServiceType A signin::GAIAServiceType value that triggered the dialog.
*/
- void openAccountManagementScreen(Context applicationContext, Profile profile);
+ void openAccountManagementScreen(
+ Context applicationContext, Profile profile, int gaiaServiceType);
}
/**
@@ -38,10 +63,23 @@ public class AccountManagementScreenHelper {
}
@CalledByNative
- private static void openAccountManagementScreen(Context applicationContext, Profile profile) {
+ private static void openAccountManagementScreen(
+ Context applicationContext, Profile profile, int gaiaServiceType) {
ThreadUtils.assertOnUiThread();
if (sManager == null) return;
- sManager.openAccountManagementScreen(applicationContext, profile);
+ sManager.openAccountManagementScreen(applicationContext, profile, gaiaServiceType);
}
+
+ /**
+ * Log a UMA event for a given metric and a signin type.
+ * @param metric A PROFILE_ANDROID_ACCOUNT_MANAGEMENT_MENU metric.
+ * @param gaiaServiceType A signin::GAIAServiceType.
+ */
+ public static void logEvent(int metric, int gaiaServiceType) {
+ nativeLogEvent(metric, gaiaServiceType);
+ }
+
+ // Native methods.
+ private static native void nativeLogEvent(int metric, int gaiaServiceType);
}
« no previous file with comments | « no previous file | chrome/browser/android/signin/account_management_screen_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698