• Justin Cohen's avatar
    [ios/web] Don't delay clear browsing data for slimnav restoration. · 7f4bdd7b
    Justin Cohen authored
    Since crrev.com/c/1540371 it's been safe to trigger a clear
    browsing data restore during a slimnav restore.  This is because we
    DetachFromWebView during clear browsing data, and reset the
    |is_restore_session_in_progress| flag.
    
    DetachFromWebView already supports extracting restore urls from history,
    so there shouldn't be any data loss.
    
    Additionally, the delay implementation is wrong, since it's valid for a
    webstate to be suspended in the tab grid  while in a slimnav restore state.
    In fact, on a restart, most tabs are in that state.  So triggering clear
    browsing data when that suspended tab is the 'active' tab, will hang forever.
    
    Bug: 961726
    TEST=
    1.) Open a few tabs and create some navigation history for each (at least 10 navigation items)
    2.) Quit the app
    3.) Launch the app and quickly clear browsing data
    
    Change-Id: Ic0a67523f5a0e2a63f31061735c12a2a27abb09f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807025Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
    Commit-Queue: Justin Cohen <justincohen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#697361}
    7f4bdd7b
main_controller.mm 107 KB