Commit 6120259b authored by Christoph Schwering's avatar Christoph Schwering Committed by Commit Bot

[Passwords] Show bulk check banner to non-syncing users.

This CL also shows the bulk check banner to users who are signed in
but do not sync.

Bug: 1047726, 1067560
Change-Id: I6f2dd091c541d67c2f1fa895df0a332e23d5f363
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134827Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Christoph Schwering <schwering@google.com>
Cr-Commit-Position: refs/heads/master@{#756218}
parent 042811bc
......@@ -44,6 +44,11 @@ Polymer({
],
properties: {
// <if expr="not chromeos">
/** @private */
storedAccounts_: Array,
// </if>
/** Preferences state. */
prefs: {
type: Object,
......@@ -98,7 +103,7 @@ Polymer({
signedIn_: {
type: Boolean,
value: true,
computed: 'computeSignedIn_(syncStatus_.signedIn)',
computed: 'computeSignedIn_(syncStatus_, storedAccounts_)',
},
/** @private */
......@@ -299,6 +304,13 @@ Polymer({
syncBrowserProxy.sendSyncPrefsChanged();
this.addWebUIListener('sync-prefs-changed', syncPrefsChanged);
// For non-ChromeOS, also check whether accounts are available.
// <if expr="not chromeos">
const storedAccountsChanged = accounts => this.storedAccounts_ = accounts;
syncBrowserProxy.getStoredAccounts().then(storedAccountsChanged);
this.addWebUIListener('stored-accounts-updated', storedAccountsChanged);
// </if>
Polymer.RenderStatus.afterNextRender(this, function() {
Polymer.IronA11yAnnouncer.requestAvailability();
});
......@@ -387,7 +399,9 @@ Polymer({
* @private
*/
computeSignedIn_() {
return !!this.syncStatus_ && !!this.syncStatus_.signedIn;
return !!this.syncStatus_ && !!this.syncStatus_.signedIn ?
!this.syncStatus_.hasError :
(!!this.storedAccounts_ && this.storedAccounts_.length > 0);
},
/**
......
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