-
Mugdha Lakhani authored
"background-fetch" permission was added to the Permissions API with this commit: https://github.com/w3c/permissions/pull/183/commits/096436eb59caaa5b244b0514d84f287392cb069b Chrome uses Automatic Downloads for this permission, so as not to add yet another user facing permission to the UI. This CL: 1. Adds a background_fetch content setting, because that's needed by PermissionContext and allows us to decouple from Automatic Downloads content setting. 2. Adds a BackgroundFetch PermissionContext mapped to this content setting. 3. Makes this PermissionContext decide whether background fetch() is permitted, which we do by: a. Querying DownloadRequestLimiter when there' a top level frame. b. Querying the Automatic Downloads content setting in other cases. For context and details, please see this document: https://docs.google.com/document/d/1rPYSlbzScw_6PLUJ3m96ZLIkxXVAWyBSL75-VDJEMso/edit?usp=sharing Bug: 886896 Change-Id: Id0fcc64d4242290f3782c61ef11babe5717b409f Reviewed-on: https://chromium-review.googlesource.com/c/1233714 Commit-Queue: Mugdha Lakhani <nator@chromium.org> Reviewed-by:
Mounir Lamouri <mlamouri@chromium.org> Reviewed-by:
Rayan Kanso <rayankans@chromium.org> Reviewed-by:
Tobias Sargeant <tobiasjs@chromium.org> Reviewed-by:
Raymes Khoury <raymes@chromium.org> Reviewed-by:
Alex Moshchuk <alexmos@chromium.org> Reviewed-by:
Dominick Ng <dominickn@chromium.org> Reviewed-by:
Steven Bennetts <stevenjb@chromium.org> Cr-Commit-Position: refs/heads/master@{#597209}
7895d362