-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iwa: Use jitter for update discovery timer
Similar to Chrome Extension updates, we add 20% jitter to the update discovery timer for IWA updates, so that it becomes less likely for severs to be overloaded if a lot of people start Chrome(OS) at the same time. To achieve this, we replace the `base::RepeatingTimer` with a `base::CancelableCallback` that we regularly schedule with 20% jitter. This also fixes a small bug where the install manager observation was only started when automatic updates were enabled - however, now that updates can also be triggered manually from chrome://web-app-internals and potentially other sources, we need to make sure that `OnWebAppUninstalled` is actually called. Fixed: b:305004160 Bug: 1444407 Change-Id: Iaddec9963b9e8f7e8a5200a131df1e7d50876a50 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4935851 Reviewed-by: Andrew Rayskiy <greengrape@google.com> Commit-Queue: Christian Flach <cmfcmf@chromium.org> Cr-Commit-Position: refs/heads/main@{#1212157}
- Loading branch information
Showing
3 changed files
with
187 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.