Reland WebApp: Improve WebAppSyncBridge::UpdateSync to use both app states.
This is a reland of https://chromium-review.googlesource.com/c/chromium/src/+/1914005 CL. The problem was that two IsTrackingMetadata() calls were under DCHECK macro. Those calls didn't happen in release builds with `dcheck_always_on=false` GN arg. The fix: promote DCHECK to CHECK to make it debug/release/dcheck_always agnostic. Original description: Improve WebAppSyncBridge::UpdateSync to use both current_state (before commit) and new_state (to be commit). In the future, it will help to skip local updates which don't touch sync data. Add WebAppSyncBridge::CommitUpdate unit tests (a.k.a. Local Changes). These tests is a promised follow up for this CL: https://chromium-review.googlesource.com/c/chromium/src/+/1830494 This code is disabled by default behind kDesktopPWAsWithoutExtensions and kDesktopPWAsUSS base features. TBR=treib@chromium.org Bug: 860583 Change-Id: I80a657c0d595bc03bebb8e241b1866daf5aa077e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1915647Reviewed-by:Alexey Baskakov <loyso@chromium.org> Commit-Queue: Alexey Baskakov <loyso@chromium.org> Cr-Commit-Position: refs/heads/master@{#715207}
Showing
This diff is collapsed.
Please register or sign in to comment