Add WebStateObserver callbacks which signal clearing browsing data operation |
|||||||||
Issue descriptioncrrev.com/c/1339340 removes most visited tiles from NTP after clearing browsing data. The current implementation is not ideal and could be improved by adding WebStateObserver::DidRemoveBrowsingData callback.
,
Nov 16
,
Nov 16
The WebUsageEnabled observer callbacks came from crrev.com/c/1339340 Here's how I suggested that the current implementation could be improved: The approach in this CL looks like it will work, but I think it could be improved. How about this? - Add a WebStateObserver callback for when web usage is enabled/disabled. - Catch this change in the NTPTabHelper. - Notify tab helperdelegate that the coordinator should be stopped when webUsageEnabled is set to NO. Arranging the code this way would help to decouple BVC from the NTP coordinators; implementing it this way will make it easier to tease out the NTP coordinator code into BrowserViewCoordinator (or whatever we end up calling the coordinator that manages BVC after future refactoring).
,
Nov 16
It's interesting that webUsageEnabled is going to be removed. We currently show an overlay over the browser when web usage is disabled to prevent browser usage right? This UI could also similarly be managed using a WebStateObserver tab helper that starts/stops that UI via delegation.
,
Nov 16
The naming stuff just came up as we discussed what we would call the observer callback, and I'm pretty flexible as to what we want to do there. It just seems we have a couple different ways of naming these callbacks, so it's not as clear what a new "notify of a property change" type observer callback should be named.
,
Nov 16
Thanks for the explanation. Per my previous comments, I would like us to remove SetWebUsageEnabled/GetWebUsageEnabled public API and replace with cookie clearing public API. Starting from iOS 12, there is no need to call SetWebUsageEnabled for cookie clearing, so we would only call SetWebUsageEnabled for iOS 11 inside ios/web. We could add WebStateObserve::WillRemoveBrowsingData WebStateObserve::DidRemoveBrowsingData for NewTabTabHelper to observe. I will update the bug description and summary to capture the requirements.
,
Nov 16
,
Nov 16
,
Nov 16
,
Nov 16
Re to #6: We show this overlay during browsing data clearing. We could use WebStateObserver::WillRemoveBrowsingData WebStateObserver::DidRemoveBrowsingData for controlling overlay presence.
,
Nov 23
,
Nov 26
,
Dec 4
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 Deleted