Commit e3378cb7 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: Ic7e29b114fd39ee0c55cafb1a0e526eb1aa78244
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1499559Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638627}
parent 507870b8
......@@ -551,10 +551,14 @@ typedef NS_ENUM(NSInteger, ItemType) {
NSString* continueButtonTitle =
l10n_util::GetNSString(IDS_IOS_DISCONNECT_DIALOG_CONTINUE_BUTTON_MOBILE);
if ([self authService] -> IsAuthenticatedIdentityManaged()) {
std::string hosted_domain =
IdentityManagerFactory::GetForBrowserState(_browserState)
->GetPrimaryAccountInfo()
.hosted_domain;
identity::IdentityManager* identityManager =
IdentityManagerFactory::GetForBrowserState(_browserState);
base::Optional<AccountInfo> accountInfo =
identityManager->FindExtendedAccountInfoForAccount(
identityManager->GetPrimaryAccountInfo());
std::string hosted_domain = accountInfo.has_value()
? accountInfo.value().hosted_domain
: std::string();
if (unified_consent::IsUnifiedConsentFeatureEnabled()) {
title =
l10n_util::GetNSString(IDS_IOS_MANAGED_DISCONNECT_DIALOG_TITLE_UNITY);
......
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