commit | 52bc9b90924309272aa54cebd865ed3075f8d634 | [log] [tgz] |
---|---|---|
author | Mustafa Emre Acer <meacer@chromium.org> | Tue Jul 30 01:40:25 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jul 30 01:40:25 2019 |
tree | 095deb48e02bc8f7e2eb72c61a66e48902bb356b | |
parent | a21c3e1eb5579da41a146624b3564181434d6abe [diff] |
Lookalikes: Properly handle interstitial reloads When the lookalike URL interstitial stops a redirect, reloading it navigates to the end of the redirect chain which hides the interstitial. In order to prevent this, this CL stores the parameters of the interstitial (URL, redirect chain and referrer) as WebContentsUserData. On page reload, the throttle retrieves the parameters and checks if the currently navigated URL is at the end of the stored redirect chain. If so, it cancels the current navigation (the reload) and navigates back to the original lookalike URL that triggered the interstitial. As a result, a reload will end up with the same interstitial as before. The throttle immediately clears stored interstitial parameters after it retrieves them, so that unrelated navigations (to a different URL, or initiated directly by the user) don't re-trigger the interstitial. Bug: 941886 Change-Id: If37802815f296bf534d7fb3b54fe96813d1659d7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1715759 Commit-Queue: Mustafa Emre Acer <meacer@chromium.org> Reviewed-by: Joe DeBlasio <jdeblasio@chromium.org> Cr-Commit-Position: refs/heads/master@{#682093}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .