Commit 27189b4f authored by Monica Basta's avatar Monica Basta Committed by Commit Bot

Fix regression in chrome://settings/manageProfile.

When 'Allow Chrome sign-in' is turned off, navigating to
chrome://settings/manageProfile' by typing it in the omnibox leads to an
empty page. The reason for that is a failure assert in
|getEditPersonAssocControl_|. |profile-row| is inside a 'dom-if'
template with the condition |!shouldShowSyncAccountControl_|. In polymer
v3, this function gets called when at least when of its arguments is
defined. In the time where the manage profile page is loaded,
|syncStatus.syncSystemEnabled| is not defined and |profile-row| is null.

This CL ensures that |getEditPersonAssocControl_| is not called before
|syncStatus.syncSystemEnabled| gets defined.

Bug: 1083879
Change-Id: Iff6a0f3fc0ebd474c2cbf0022a524358c3f2d0a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2207533Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Commit-Queue: Monica Basta <msalama@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770506}
parent 3c4fff94
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</settings-sync-account-control> </settings-sync-account-control>
</template> </template>
<template is="dom-if" if="[[!shouldShowSyncAccountControl_( <template is="dom-if" if="[[!shouldShowSyncAccountControl_(
syncStatus.syncSystemEnabled)]]" restamp> syncStatus.syncSystemEnabled, signinAllowed_)]]" restamp>
<div id="profile-row" class="cr-row first two-line" <div id="profile-row" class="cr-row first two-line"
actionable$="[[isProfileActionable_]]" actionable$="[[isProfileActionable_]]"
on-click="onProfileTap_"> on-click="onProfileTap_">
...@@ -162,7 +162,8 @@ shown on non-ChromeOS platforms --> ...@@ -162,7 +162,8 @@ shown on non-ChromeOS platforms -->
<if expr="not chromeos"> <if expr="not chromeos">
<template is="dom-if" route-path="/manageProfile"> <template is="dom-if" route-path="/manageProfile">
<settings-subpage <settings-subpage
associated-control="[[getEditPersonAssocControl_()]]" associated-control=
"[[getEditPersonAssocControl_(signinAllowed_)]]"
page-title="$i18n{editPerson}"> page-title="$i18n{editPerson}">
<settings-manage-profile profile-name="[[profileName_]]" <settings-manage-profile profile-name="[[profileName_]]"
sync-status="[[syncStatus]]"> sync-status="[[syncStatus]]">
......
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