[Background Sync] Fix bug in setting num_attempts.
We should only increment num_attempts for Periodic Background Sync if the event has been unsuccessful. This also extracts out the logic of calculating num_attempts into a helper method. Bug: 989444 Change-Id: I820f91cd2799be9803295cf9baf3dbd194fd3b97 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1729078Reviewed-by:Rayan Kanso <rayankans@chromium.org> Commit-Queue: Mugdha Lakhani <nator@chromium.org> Cr-Commit-Position: refs/heads/master@{#682712}
Showing
Please register or sign in to comment