Commit c36e5134 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Preparation to convert GetPrimaryAccount to return CoreAccountInfo

Change client code to work as if IdentityManager::GetPrimaryAccount
where returning a CoreAccountInfo instead of an AccountInfo. Method
will be updated in a followup CL.

This CL was uploaded by git cl split.

Bug: 926204
Change-Id: I963b34fe4bf1dac600e7859608c8090bbb05396b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1499539Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637646}
parent 59c68c46
......@@ -101,8 +101,12 @@ void ChildAccountService::Init() {
// If we're already signed in, check the account immediately just to be sure.
// (We might have missed an update before registering as an observer.)
if (identity_manager_->HasPrimaryAccount())
OnExtendedAccountInfoUpdated(identity_manager_->GetPrimaryAccountInfo());
base::Optional<AccountInfo> primary_account_info =
identity_manager_->FindExtendedAccountInfoForAccount(
identity_manager_->GetPrimaryAccountInfo());
if (primary_account_info.has_value())
OnExtendedAccountInfoUpdated(primary_account_info.value());
}
bool ChildAccountService::IsChildAccountStatusKnown() {
......
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