Commit 80be7ab8 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Stop recording "Profile destruction" bucket of Sync.StopSource

It was never accurate: It was recorded during most profile destructions,
even if Sync was never enabled in the first place. Since I'm not aware
of anything that depends on this number, let's just get rid of it rather
than replace it with something that works.

Bug: none
Change-Id: I397e499f559852188c731c04cbb748f98a69fe24
Reviewed-on: https://chromium-review.googlesource.com/1117068Reviewed-by: default avatarJan Krcal <jkrcal@chromium.org>
Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570785}
parent bb3da314
...@@ -1552,20 +1552,11 @@ void ProfileManager::OnLoadProfileForProfileDeletion( ...@@ -1552,20 +1552,11 @@ void ProfileManager::OnLoadProfileForProfileDeletion(
content::NotificationService::NoDetails()); content::NotificationService::NoDetails());
// Disable sync for doomed profile. // Disable sync for doomed profile.
if (ProfileSyncServiceFactory::GetInstance()->HasProfileSyncService( if (ProfileSyncServiceFactory::HasProfileSyncService(profile)) {
profile)) {
browser_sync::ProfileSyncService* sync_service = browser_sync::ProfileSyncService* sync_service =
ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile); ProfileSyncServiceFactory::GetForProfile(profile);
if (sync_service->IsSyncRequested()) {
// Record sync stopped by profile destruction if it was on before.
UMA_HISTOGRAM_ENUMERATION("Sync.StopSource",
syncer::PROFILE_DESTRUCTION,
syncer::STOP_SOURCE_LIMIT);
}
// Ensure data is cleared even if sync was already off. // Ensure data is cleared even if sync was already off.
ProfileSyncServiceFactory::GetInstance() sync_service->RequestStop(browser_sync::ProfileSyncService::CLEAR_DATA);
->GetForProfile(profile)
->RequestStop(browser_sync::ProfileSyncService::CLEAR_DATA);
} }
ProfileAttributesEntry* entry; ProfileAttributesEntry* entry;
......
...@@ -45052,7 +45052,11 @@ would be helpful to identify which type is being sent. ...@@ -45052,7 +45052,11 @@ would be helpful to identify which type is being sent.
</enum> </enum>
<enum name="SyncStopSource"> <enum name="SyncStopSource">
<int value="0" label="Profile destruction"/> <int value="0" label="DEPRECATED 2018-06 Profile destruction">
Supposedly meant that Sync was stopped due to the profile being destroyed.
However, it was recorded during most profile destructions, even if Sync was
never enabled in the first place. We stopped recording this in 2018-06.
</int>
<int value="1" label="Sign out"/> <int value="1" label="Sign out"/>
<int value="2" label="Birthday error"/> <int value="2" label="Birthday error"/>
<int value="3" label="Chrome sync settings"/> <int value="3" label="Chrome sync settings"/>
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