[ios] Add WebState::GetLastActiveTime()
Add the notion of "last active time" to WebState (mirroring the same notion in content::WebContents). The time reflects the last time the WebState become visible. Convert ShoppingPersistedDataTabHelper and TabUrlProviderImpl to use "last active time" instead of checking the timestamp of the last committed item (as an approximation of the last active time). Save and restore the "last active time" when saving the session as we do not want the value to be cleared if the OS decides to kill Chrome while it is suspended. Force the "last active time" to "now" when cloning a WebState during "preload" or "link preview" features. Bug: 1238043, 1291626 Change-Id: I70f5b2d05af4e4422a4a9e3e4efb21a9f076ace0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3440215 Reviewed-by:Gauthier Ambard <gambard@chromium.org> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Auto-Submit: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/main@{#968343}
Loading
Please register or sign in to comment