Fix crash when constructing ClientSideDetectionService
We are seeing crash stacks when constructing the ClientSideDetectionService since the SafeBrowsingService has not yet been notified of the creation of the Profile. This is because in certain circumstances (e.g. https://crash.corp.google.com/browse?reportid=defdca17c66310c3) a renderer is created for this Profile before ProfileManagerObservers are notified. We can solve this by checking for the DisableClientSidePhishingDetection flag explicitly, instead of calling into ClientSideDetectionServiceFactory, which has the side effect of creating a ClientSideDetectionService if it does not yet exist. Bug: 1131885 Change-Id: If9116613f1914ab1beee25296847840f91c52e78 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2451523Reviewed-by:Bettina Dea <bdea@chromium.org> Commit-Queue: Daniel Rubery <drubery@chromium.org> Cr-Commit-Position: refs/heads/master@{#814472}
Showing
Please register or sign in to comment