Commit 10be3096 authored by Anastasiia Nikolaienko's avatar Anastasiia Nikolaienko Committed by Commit Bot

Check if removed account is primary in child account service

If child user has secondary accounts, the IsChild profile property will
be set to false after removal of any account. Fix this by checking if
the removed account is a primary account in
OnExtendedAccountInfoRemoved method.

Bug: 1043108
Change-Id: Ia9038932bb3baff8ae69a46675b5a995e3294826
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2015161Reviewed-by: default avatarAga Wronska <agawronska@chromium.org>
Reviewed-by: default avatarKush Sinha <sinhak@chromium.org>
Commit-Queue: Anastasiia Nikolaienko <anastasiian@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734514}
parent a6fe6c1f
......@@ -267,6 +267,9 @@ void ChildAccountService::OnExtendedAccountInfoUpdated(
void ChildAccountService::OnExtendedAccountInfoRemoved(
const AccountInfo& info) {
if (info.account_id != identity_manager_->GetPrimaryAccountId())
return;
SetIsChildAccount(false);
}
......
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