Commit 458f8feb authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Sync for secondary accounts: No Sync confirmation needed

ProfileSyncService::IsSyncConfirmationNeeded is used by the UI as a signal
for showing a Sync error (see
AvatarButtonErrorController::SyncErrorObserver::HasSyncError). This is not
appropriate if Sync is running in transport-only mode for a secondary
account (there's nothing to confirm). So this CL changes
IsSyncConfirmationNeeded to return false if the current account isn't
primary. This fixes a wrongly-shown "Sync error" in the avatar button.

Bug: 871221
Change-Id: Icdaa5f7b46acd6eac1a65adc4d49d20296a6f044
Reviewed-on: https://chromium-review.googlesource.com/1196364Reviewed-by: default avatarJan Krcal <jkrcal@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587547}
parent bbc67a1b
...@@ -891,7 +891,8 @@ bool ProfileSyncService::IsSyncConfirmationNeeded() const { ...@@ -891,7 +891,8 @@ bool ProfileSyncService::IsSyncConfirmationNeeded() const {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return (!IsLocalSyncEnabled() && IsSignedIn()) && !IsSetupInProgress() && return (!IsLocalSyncEnabled() && IsSignedIn()) && !IsSetupInProgress() &&
!IsFirstSetupComplete() && !IsFirstSetupComplete() &&
!HasDisableReason(DISABLE_REASON_USER_CHOICE); !HasDisableReason(DISABLE_REASON_USER_CHOICE) &&
IsAuthenticatedAccountPrimary();
} }
void ProfileSyncService::UpdateLastSyncedTime() { void ProfileSyncService::UpdateLastSyncedTime() {
......
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