Add DCHECK and TODO to keyed service about lazy-initialised factories.
Lazily-initialised keyed service factories are not correctly set to produce null services while testing, nor can they correctly run ServiceIsCreatedWithContext. This introduces bugs that are non-obvious from the interface in keyed_service_base_factory. This CL adds a DCHECK so users of ServiceIsCreatedWithContext and ServiceIsNULLWhileTesting will be notified that those methods won't work as expected, and a TODO to enforce the check on all factories. Split out from crrev.com/c/2539813 Bug: 1150733 Change-Id: I628fe3268a287d2e2e9a6eab94f0d91e9633a62a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2554194 Commit-Queue: Glen Robertson <glenrob@chromium.org> Reviewed-by:Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#832637}
Showing
Please register or sign in to comment