• Daniel Rubery's avatar
    Refactor content analysis in CheckClientDownloadRequest to its own class · a122489a
    Daniel Rubery authored
    There are two problems with the CheckClientDownloadRequest that this CL
    takes steps towards resolving. First, the control flow of the
    CheckClientDownloadRequest is very difficult to follow due to a large
    number of private helper methods. Secondly, it uses several techniques
    to prevent use-after-free (ref-counting, weak pointers, and cancellable
    tasks). This CL encapsulates the logic that was in
    CheckClientDownloadRequest that was related to analyzing the content
    of the file into a singly-owned class, so that those two concerns can
    be more easily addressed.
    
    TODO: The FileAnalyzer still needs to be tested for RAR files.
    
    Bug: 889986
    Change-Id: I81c02bd3491c116a949dc959f2f02208511209bd
    Reviewed-on: https://chromium-review.googlesource.com/c/1272275
    Commit-Queue: Daniel Rubery <drubery@chromium.org>
    Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#600785}
    a122489a
BUILD.gn 3.48 KB