Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track previous sync enabled state in url consent helper.
When sync state events came in, the current/new value of IsSyncFeatureEnabled would leak into the old_state value in the url consent helper. This caused transitions from kInvalid to kDisabled to be missed, and no associated event was fired to ConsentThrottle. This missed event caused an invariant in ConsentThrottle to be violated, triggering a CHECK and crashing the browser. This change fixes this by only reading IsSyncFeatureEnabled during an update, and storing it in a member field to be used when calculating the current state. (cherry picked from commit d42904f) Bug: 1483454 Change-Id: I2e41ae4a2c4e9fe9d686fe74cfc9e8d5c939ff22 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4879153 Reviewed-by: Brandon Wylie <wylieb@chromium.org> Reviewed-by: Mihai Sardarescu <msarda@chromium.org> Commit-Queue: Sky Malice <skym@chromium.org> Reviewed-by: Marc Treib <treib@chromium.org> Reviewed-by: Sophie Chang <sophiechang@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1199747} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4890053 Commit-Queue: Krishna Govind <govind@chromium.org> Reviewed-by: Krishna Govind <govind@chromium.org> Owners-Override: Krishna Govind <govind@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/branch-heads/5993@{#796} Cr-Branched-From: 5113507-refs/heads/main@{#1192594}
- Loading branch information