• Eugene But's avatar
    Added feature flags for FileDownload and PassKitDownload features. · 11fe3c86
    Eugene But authored
    This CL adds kNewPassKitDownload and kNewFileDownload flags usage
    to the web layer. Turning on kNewPassKitDownload flag will disable
    CRWPassKitDownloader and webController:didLoadPassKitObject: callback.
    Turning on kNewFileDownload will disable
    controllerForUnhandledContentAtURL: callback.
    Turning either of these flags on will add a logic, which discards
    pending item if that item is download.
    
    Both flags are turned off by default and there is no way to enable
    them via chrome://flags yet.
    
    This CL slightly changes the code inside WKNavigationDelegate's
    webView:decidePolicyForNavigationResponse:decisionHandler: as follows:
     - CRWPassKitDownloader download is moved behind |!allowNavigation|
     - allowNavigation is not set to no if MIME type is PassKit
    These are non functional changes because if MIME type is PassKit, then
    |allowNavigation| is always NO.
    
    Bug: 780646
    Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
    Change-Id: I948ae3e1f38d266eda8aa7b99900900d8c02fef3
    Reviewed-on: https://chromium-review.googlesource.com/783671
    Commit-Queue: Eugene But <eugenebut@chromium.org>
    Reviewed-by: default avatarGregory Chatzinoff <gchatz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#519795}
    11fe3c86
crw_web_controller.mm 213 KB