New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 877440 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 28
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

SyncAuthManager doesn't enforce its supposed invariant

Project Member Reported by treib@chromium.org, Aug 24

Issue description

SyncAuthManager claims (in some comments) to have an invariant that only one of
a) an access token,
b) an ongoing access token request, or
c) a scheduled access token request
exists at any given time. However, it does not consistently enforce this invariant.
It's unclear if this causes any actual problems, but it's certainly confusing. I suspect that the weird chrome://sync-internals state on bug 875315 (e.g. "Next Token Reqeust" time in the past) might be related to this.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/92d3cf591eaa5e1ab986923e6a30331724b63c74

commit 92d3cf591eaa5e1ab986923e6a30331724b63c74
Author: Marc Treib <treib@chromium.org>
Date: Tue Aug 28 16:00:59 2018

SyncAuthManager: enforce supposed invariant (oneof token,request,retry)

SyncAuthManager has a supposed invariant that only one of an access token,
an access token request, or a pending retry can exist at any one time.
However, it didn't properly enforce this, so in some cases the invariant
could be violated. This CL fixes that, and adds a bunch of DCHECKs to make
sure.

Bug:  877440 
Change-Id: I756e41d5045edb36fcfaa53104092a4f299a1e20
Reviewed-on: https://chromium-review.googlesource.com/1188472
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586725}
[modify] https://crrev.com/92d3cf591eaa5e1ab986923e6a30331724b63c74/components/browser_sync/sync_auth_manager.cc
[modify] https://crrev.com/92d3cf591eaa5e1ab986923e6a30331724b63c74/components/browser_sync/sync_auth_manager.h

Status: Fixed (was: Started)

Sign in to add a comment