background sync: Prepare for service worker UI thread core (pt 2).
This is a follow-up to r689906. It converts code added since then. Also, this fixes a flaky DCHECK hit when trying to use the KeepAliveRegistry after shutdown, when running the VerifyShutdownBehavior test locally. I think this happens when the core thread is the UI thread because we immediately try to make keep alive object instead of posting a task to the UI thread to do so. [ RUN ] BackgroundSyncBrowserTest.VerifyShutdownBehavior [FATAL:keep_alive_registry.cc(107)] Check failed: !is_shutting_down_. ... 3 KeepAliveRegistry::Register() 4 BackgroundSyncControllerImpl::BackgroundSyncEventKeepAliveImpl::BackgroundSyncEventKeepAliveImpl() 5 BackgroundSyncControllerImpl::CreateBackgroundSyncEventKeepAlive() 6 content::(anonymous namespace)::CreateBackgroundSyncEventKeepAliveOnUIThread() 7 content::BackgroundSyncManager::DidResolveRegistrationImpl() Bug: 824858 Change-Id: I5d2ad7878cbd35203fe81fda013f1a839ee89c7f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772415Reviewed-by:Mugdha Lakhani <nator@chromium.org> Commit-Queue: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#691621}
Showing
Please register or sign in to comment