• Joe DeBlasio's avatar
    [MIX-DL] Trigger warn/block/silent blocking via feature parameters. · a045a94c
    Joe DeBlasio authored
    This CL adds feature parameters that create allowlists or blocklists for
    warnings, blocking and silent blocking. Finally, it updates the
    triggering logic to use those parameters.
    
    The triggering code contains default file extensions which are used when the
    feature parameter is not set. These are only used when the user
    explicitly enables the feature for testing.
    
    To make testing easier, we:
     - SILENT_BLOCK on files ending in the contrived
       ".silently_block_for_testing".
     - BLOCK files that are executables or archive types, or any download
       that's explicitly user-requested (e.g. from a context menu).
     - WARN on everything else except ".dont_warn_for_testing" files.
    
    Bug: 960819
    Change-Id: I006d4e0c3f45b64e3cd84b0ef21cc506988bf5cb
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1984703
    Commit-Queue: Joe DeBlasio <jdeblasio@chromium.org>
    Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
    Reviewed-by: default avatarMustafa Emre Acer <meacer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#737470}
    a045a94c
chrome_features.cc 38 KB