Set a limit of active registrations an origin can have, and reject any new ones if the limit is reached
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/177ba2b6cc83d1d14db9636e8b751ee7fcf4acee commit 177ba2b6cc83d1d14db9636e8b751ee7fcf4acee Author: Rayan Kanso <rayankans@chromium.org> Date: Thu Sep 27 14:18:58 2018 [Background Fetch] Enforce active registration limit per origin. Set a per-origin limit (5) for how many active background fetch registrations an origin can have. This is to avoid a potential abuse vector until a more concrete permission model is in place. With this, an origin can't keep registering fetches and permanently have a notification shown, also blocking other origins from starting a background fetch. Bug: 889401 Change-Id: I9aeac7121c46ffdd3910b3b891051e9c4951bc6e Reviewed-on: https://chromium-review.googlesource.com/1245369 Commit-Queue: Rayan Kanso <rayankans@chromium.org> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org> Reviewed-by: Peter Beverloo <peter@chromium.org> Cr-Commit-Position: refs/heads/master@{#594712} [modify] https://crrev.com/177ba2b6cc83d1d14db9636e8b751ee7fcf4acee/content/browser/background_fetch/background_fetch_data_manager_unittest.cc [modify] https://crrev.com/177ba2b6cc83d1d14db9636e8b751ee7fcf4acee/content/browser/background_fetch/background_fetch_service_unittest.cc [modify] https://crrev.com/177ba2b6cc83d1d14db9636e8b751ee7fcf4acee/content/browser/background_fetch/background_fetch_test_base.cc [modify] https://crrev.com/177ba2b6cc83d1d14db9636e8b751ee7fcf4acee/content/browser/background_fetch/background_fetch_test_base.h [modify] https://crrev.com/177ba2b6cc83d1d14db9636e8b751ee7fcf4acee/content/browser/background_fetch/storage/create_metadata_task.cc [modify] https://crrev.com/177ba2b6cc83d1d14db9636e8b751ee7fcf4acee/content/browser/background_fetch/storage/create_metadata_task.h [modify] https://crrev.com/177ba2b6cc83d1d14db9636e8b751ee7fcf4acee/content/browser/service_worker/service_worker_context_wrapper.cc [modify] https://crrev.com/177ba2b6cc83d1d14db9636e8b751ee7fcf4acee/content/browser/service_worker/service_worker_context_wrapper.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/933c4c53594e3c66256f63a4f9fec46f7524d816 commit 933c4c53594e3c66256f63a4f9fec46f7524d816 Author: Rayan Kanso <rayankans@chromium.org> Date: Tue Oct 02 18:53:12 2018 [Background Fetch] Report registration limit error to developers. Adds a BackgroundFetchError which is propagated to the developer. Bug: 889401 Change-Id: Ie4505cd0f50ab263cce5d66c854094133bc3539c Reviewed-on: https://chromium-review.googlesource.com/1246102 Commit-Queue: Rayan Kanso <rayankans@chromium.org> Reviewed-by: Mugdha Lakhani <nator@chromium.org> Reviewed-by: Ken Buchanan <kenrb@chromium.org> Reviewed-by: Peter Beverloo <peter@chromium.org> Cr-Commit-Position: refs/heads/master@{#595933} [modify] https://crrev.com/933c4c53594e3c66256f63a4f9fec46f7524d816/content/browser/background_fetch/background_fetch_data_manager_unittest.cc [modify] https://crrev.com/933c4c53594e3c66256f63a4f9fec46f7524d816/content/browser/background_fetch/storage/create_metadata_task.cc [add] https://crrev.com/933c4c53594e3c66256f63a4f9fec46f7524d816/third_party/WebKit/LayoutTests/http/tests/background_fetch/fetch.https.html [modify] https://crrev.com/933c4c53594e3c66256f63a4f9fec46f7524d816/third_party/blink/public/platform/modules/background_fetch/background_fetch.mojom [modify] https://crrev.com/933c4c53594e3c66256f63a4f9fec46f7524d816/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc [modify] https://crrev.com/933c4c53594e3c66256f63a4f9fec46f7524d816/third_party/blink/renderer/modules/background_fetch/background_fetch_registration.cc [modify] https://crrev.com/933c4c53594e3c66256f63a4f9fec46f7524d816/third_party/blink/renderer/modules/background_fetch/background_fetch_update_ui_event.cc [modify] https://crrev.com/933c4c53594e3c66256f63a4f9fec46f7524d816/tools/metrics/histograms/enums.xml
Comment 1 by rayankans@chromium.org
, Sep 26Status: Started (was: Untriaged)