• Mikel Astiz's avatar
    Avoid too many title changes in history · 2e4f63c9
    Mikel Astiz authored
    Pages can use Javascript to update the title, which is an event that,
    from history's perspective, we added support for quite recently in
    https://chromium-review.googlesource.com/847697
    
    We're mostly interested during page load, and the first few seconds
    after loading has completed (just in case). However, some pages stay for
    very long (even indefinitely) in loading state, so we should guard
    against too many updates hammering history, which as side effect can
    trigger sync.
    
    We cap the max number of title updates per navigation, i.e. with a
    shared counter for the full timespan during which title updates are
    propagated to history (loading state and the few seconds after loaded).
    
    Bug: 843057
    Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
    Change-Id: I3eb8c4157b951ea2aae941510719256bd26491d7
    Reviewed-on: https://chromium-review.googlesource.com/1060055
    Commit-Queue: Mikel Astiz <mastiz@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#561001}
    2e4f63c9
BUILD.gn 285 KB