[Background Fetch] Lazily initialize download service used by the delegate.
If the storage partitions are not fully initialized, the delegate factory will enter an infinite loop when trying to create an instance of BackgroundFetchDelegateImpl. This changes moves the service initialization logic from the constructor to a lazy accessor function, which is guaranteed to be called after the IO thread is up and running. This means all Storage Partitions will have been loaded. This behavior can be triggered when creating a BackgroundFetchDelegateImpl in incognito mode. Bug: 766082 Change-Id: I320e146634792e16a61514620639ece38b022349 Reviewed-on: https://chromium-review.googlesource.com/1167842 Commit-Queue: Rayan Kanso <rayankans@chromium.org> Reviewed-by:Peter Beverloo <peter@chromium.org> Cr-Commit-Position: refs/heads/master@{#582133}
Showing
Please register or sign in to comment