Commit 2871fcd2 authored by mlerman@chromium.org's avatar mlerman@chromium.org

UMA Metrics to track profile deletion, along with signed-in status.

BUG=357693

Review URL: https://codereview.chromium.org/345733006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278606 0039d316-1c4b-4281-b951-d872f2087c98
parent 54733e1e
...@@ -1100,6 +1100,10 @@ void ProfileManager::FinishDeletingProfile(const base::FilePath& profile_dir) { ...@@ -1100,6 +1100,10 @@ void ProfileManager::FinishDeletingProfile(const base::FilePath& profile_dir) {
ProfileSyncServiceFactory::GetInstance()->GetForProfile( ProfileSyncServiceFactory::GetInstance()->GetForProfile(
profile)->DisableForUser(); profile)->DisableForUser();
} }
bool profile_is_signed_in = !cache.GetUserNameOfProfileAtIndex(
cache.GetIndexOfProfileWithPath(profile_dir)).empty();
ProfileMetrics::LogProfileDelete(profile_is_signed_in);
} }
QueueProfileDirectoryForDeletion(profile_dir); QueueProfileDirectoryForDeletion(profile_dir);
......
...@@ -362,6 +362,10 @@ void ProfileMetrics::LogProfileDesktopMenu( ...@@ -362,6 +362,10 @@ void ProfileMetrics::LogProfileDesktopMenu(
} }
} }
void ProfileMetrics::LogProfileDelete(bool profile_was_signed_in) {
UMA_HISTOGRAM_BOOLEAN("Profile.Delete", profile_was_signed_in);
}
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
void ProfileMetrics::LogProfileAndroidAccountManagementMenu( void ProfileMetrics::LogProfileAndroidAccountManagementMenu(
ProfileAndroidAccountManagementMenu metric, ProfileAndroidAccountManagementMenu metric,
......
...@@ -158,6 +158,7 @@ class ProfileMetrics { ...@@ -158,6 +158,7 @@ class ProfileMetrics {
static void LogProfileUpgradeEnrollment(ProfileUpgradeEnrollment metric); static void LogProfileUpgradeEnrollment(ProfileUpgradeEnrollment metric);
static void LogProfileDesktopMenu(ProfileDesktopMenu metric, static void LogProfileDesktopMenu(ProfileDesktopMenu metric,
signin::GAIAServiceType gaia_service); signin::GAIAServiceType gaia_service);
static void LogProfileDelete(bool profile_was_signed_in);
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
static void LogProfileAndroidAccountManagementMenu( static void LogProfileAndroidAccountManagementMenu(
......
...@@ -22459,6 +22459,17 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -22459,6 +22459,17 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary> </summary>
</histogram> </histogram>
<histogram name="Profile.Delete" enum="BooleanProfileSignedIn">
<owner>mlerman@chromium.org</owner>
<summary>
The user used the settings page to delete a profile. Please note this
histogram tracks the user interaction, and not the actual delete of the
profile, which can happen much later. The parameter indicates if the profile
was signed in or not; true means the profile was signed in, false means the
profile was not signed in.
</summary>
</histogram>
<histogram name="Profile.DesktopMenu" enum="ProfileDesktopMenu"> <histogram name="Profile.DesktopMenu" enum="ProfileDesktopMenu">
<owner>mlerman@chromium.org</owner> <owner>mlerman@chromium.org</owner>
<summary> <summary>
...@@ -33901,6 +33912,11 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -33901,6 +33912,11 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<int value="1" label="Orphan"/> <int value="1" label="Orphan"/>
</enum> </enum>
<enum name="BooleanProfileSignedIn" type="int">
<int value="0" label="Profile was not Signed In"/>
<int value="1" label="Profile was Signed In"/>
</enum>
<enum name="BooleanRaced" type="int"> <enum name="BooleanRaced" type="int">
<int value="0" label="Did Not Race"/> <int value="0" label="Did Not Race"/>
<int value="1" label="Raced"/> <int value="1" label="Raced"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment