Resolve crash caused by enterprise whitelist checking
In the previous implementation, a raw ProfileIOData* is passed around to facilitate enterprise whitelist checking. However, it is possible (e.g. during browser shutdown) the UrlCheckerDelegate outlives ProfileIOData, thus causes crash when calling this raw pointer. To fix this lifespan issue, we remove the ProfileIOData raw pointer that is indirectly passed to URLCheckerDelegateImpl, and move all the enterprise whitelist checking logic to earlier stage where we're sure the ProfileIOData pointer is valid. This CL doesn't change the existing behavior of enterprise whitelist checking, therefore SafeBrowsingBlockingPageBrowserTest:: VerifyEnterpriseWhitelist still passes after this change with or without enabling kNetworkService feature. Bug: 818559 Change-Id: Idba3c03f90dad3a78e033c43016179b8cc6e5515 Reviewed-on: https://chromium-review.googlesource.com/969642 Commit-Queue: Jialiu Lin <jialiul@chromium.org> Reviewed-by:Matt Menke <mmenke@chromium.org> Reviewed-by:
Varun Khaneja <vakh@chromium.org> Cr-Commit-Position: refs/heads/master@{#544922}
Showing
Please register or sign in to comment