Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Issue 2845053002: Avoid showing the supervised user block interstitial more than once (Closed)

Created:
3 years, 7 months ago by Bernhard Bauer
Modified:
3 years, 7 months ago
Reviewers:
Marc Treib
CC:
chromium-reviews, pam+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid showing the supervised user block interstitial more than once With asynchronous checks, it can happen that multiple checks return that the current page should be blocked. When trying to show an interstitial page over another existing one, the old interstitial page automatically is closed, which for the case of the supervised user interstitial would close the whole tab if there is no navigation to go back to. Add a flag in SupervisedUserNavigationObserver that stores whether an interstitial is currently showing, and clear it when the interstitial is closed. Because the SupervisedUserNavigationObserver is now used to store state, it is required in order to show the interstitial, so the navigation will now fail if the SupervisedUserNavigationObserver for a WebContents is missing. Also, remove the case where the interstitial immediately proceeds, because the URL filter is always checked on the UI thread. BUG=715981 Review-Url: https://codereview.chromium.org/2845053002 Cr-Commit-Position: refs/heads/master@{#468591} Committed: https://chromium.googlesource.com/chromium/src/+/3483d15c1e3cec604c66663f19654a271bfe77ec

Patch Set 1 #

Patch Set 2 : fix #

Patch Set 3 : tests #

Patch Set 4 : comments #

Total comments: 4

Patch Set 5 : comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -65 lines) Patch
M chrome/browser/supervised_user/supervised_user_browsertest.cc View 1 2 3 4 4 chunks +103 lines, -31 lines 0 comments Download
M chrome/browser/supervised_user/supervised_user_interstitial.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/supervised_user/supervised_user_interstitial.cc View 1 2 5 chunks +5 lines, -17 lines 0 comments Download
M chrome/browser/supervised_user/supervised_user_navigation_observer.h View 2 chunks +15 lines, -1 line 0 comments Download
M chrome/browser/supervised_user/supervised_user_navigation_observer.cc View 1 2 4 chunks +42 lines, -12 lines 0 comments Download
M chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc View 1 2 2 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 29 (24 generated)
Bernhard Bauer
Please review :)
3 years, 7 months ago (2017-04-28 16:17:49 UTC) #19
Marc Treib
lgtm Meta-comment: All this interstitial code feels way too intricate and fragile; we keep having ...
3 years, 7 months ago (2017-05-02 08:24:47 UTC) #22
Bernhard Bauer
On 2017/05/02 08:24:47, Marc Treib wrote: > lgtm > > Meta-comment: All this interstitial code ...
3 years, 7 months ago (2017-05-02 09:02:54 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2845053002/80001
3 years, 7 months ago (2017-05-02 09:04:28 UTC) #26
commit-bot: I haz the power
3 years, 7 months ago (2017-05-02 09:54:43 UTC) #29
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/3483d15c1e3cec604c66663f1965...

Powered by Google App Engine
This is Rietveld 408576698