[iOS] Create SafeBrowsingUnsafeResourceContainer
This tab helper is used to store copies of UnsafeResources that are detected by the URL checks kicked off by the SafeBrowsingTabHelper. It will be populated with UnsafeResources by the UrlCheckerDelegateImpl before calling the SafeBrowsingTabHelper::UrlCheckerClient's completion callback. When the WebClient is preparing the error page for the unsafe navigation, it can pop the UnsafeResource copy and use it to populate the WebUI. For unsafe resources in the main frame, a copy is stored directly in the tab helper, as the associated pending NavigationItem may be deleted due to the navigation cancellation. For unsafe subresources, a copy is stored in the NavigationItem's user data. When the SafeBrowsingTabHelper detects an unsafe subresource, it will kick off a reload of the NavigationItem and use the presence of the unsafe subresource in the stack to cancel the main frame navigation and display the error page. Bug: 1064803 Change-Id: I96c99e0d5ca23443400a493023edb9f13a4fd393 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2166128Reviewed-by:Rohit Rao <rohitrao@chromium.org> Reviewed-by:
Ali Juma <ajuma@chromium.org> Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org> Auto-Submit: Kurt Horimoto <kkhorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#763455}
Showing
Please register or sign in to comment