• Danyao Wang's avatar
    [Nav Experiment] Fix offline reading list for WKBasedNavigationManager. · e423142a
    Danyao Wang authored
    When handling a no-Internet-connection error, WKBasedNavigationManager
    incorrectly triggers WebState::OnPageLoaded with load completion status
    SUCCESS when the native error view is loaded. This prevented
    ReadingListWebStateObserver from triggering and loading offline content
    and is now fixed.
    
    Since offline reading list is essentially another type of native error,
    we must not update the navigation item's |errorRetryState| when loading
    a chrome://offline URL. This is so that a reload of the page will retry
    loading the original URL. This is fixed by only updating the error retry
    state machine when the URL is a web URL. This is OK because app-specific
    URL should never fail to load.
    
    Bug: 819805
    Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
    Change-Id: I870ef99522ba6f5aeb4d37c58289155aa8cb79c9
    Reviewed-on: https://chromium-review.googlesource.com/996434
    Commit-Queue: Danyao Wang <danyao@chromium.org>
    Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#548454}
    e423142a
crw_web_controller.mm 223 KB