-
Ahmed Fakhry authored
The feedback uploader can spam the server with tons of instances of the exact same report due to the following: 1) Corrupted reports will be retied once every 60 minutes and on every login. Each retry will fail with the exact same ClientError, so there's no point in retrying. 2) FeedbackProfileObserver and FeedbackUploader were using two different types of task runners with different threads from their blocking pools. This can lead to a race condition (when corrupted reports are being resent on login) between the thread that reads the unsent file, and the thread that rewrites the file before it's attempted to be resent. This CL: - Fixes (1) by introducing an exponential backoff delay on failures other than ClientErrors, and not retry on Client Errors. - Fixes (2) by using the same type of SingleThreadTaskRunner for all feedback background tasks to ensure sequencing and thread affinity. - Adds some tests. BUG=739885 TEST=adds new tests. Change-Id: Ia80afbb77349444a02321f22754d3d89cd536507 Reviewed-on: https://chromium-review.googlesource.com/564304 Reviewed-by: Rahul Chaturvedi <rkc@chromium.org> Commit-Queue: Ahmed Fakhry <afakhry@chromium.org> Cr-Commit-Position: refs/heads/master@{#488758}
af8ab059