Commit f7208a09 authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

[unified-consent] Fix recording of revoke reason kUserSignedOut

The revoke reason kUserSignedOut should only be recorded when
the user opted into unified consent before. This CL fixes this.

Bug: 868892
Change-Id: I746ca040a554ec78599f16871e831acc11c7afcf
Reviewed-on: https://chromium-review.googlesource.com/1238583Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593515}
parent 8452ee72
......@@ -298,9 +298,11 @@ void UnifiedConsentService::OnServiceStateChanged(Service service) {
void UnifiedConsentService::OnPrimaryAccountCleared(
const AccountInfo& account_info) {
// When signing out, the unfied consent is revoked.
pref_service_->SetBoolean(prefs::kUnifiedConsentGiven, false);
RecordUnifiedConsentRevoked(
metrics::UnifiedConsentRevokeReason::kUserSignedOut);
if (IsUnifiedConsentGiven()) {
SetUnifiedConsentGiven(false);
RecordUnifiedConsentRevoked(
metrics::UnifiedConsentRevokeReason::kUserSignedOut);
}
// By design, signing out of Chrome automatically disables off-by-default
// services.
......
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