• Marijn Kruisselbrink's avatar
    [FileAPI] Change how snapshots are captured by blink::File. · 2e8a62b7
    Marijn Kruisselbrink authored
    Instead of going through mojom::blink::FileUtilitiesHost and passing a path
    from the renderer back to the browser, add a new method to mojom::blink::Blob
    to do the same thing. Since the blob already knows what file a blob is
    referencing, this both makes things slightly more secure (or at least gets
    us closer to a place where we can get rid of things like
    ChildProcessSecurityPolicyImpl::CanReadFile) and makes this
    work in a couple more cases after a File is for example postMessaged to a
    worker or frame in a different process as well.
    
    Additionally this gets us closer to unifying what the renderer and browser
    processes consider to be "the" snapshot state of any particular blob. In
    a follow-up CL the browser side code will change to return its snapshot
    state (if any), rather than always returning the current state on disk.
    
    This is part of a series of changes to improve consistency surrounding how
    snapshot state of files/blobs is implemented.
    
    Bug: 844874
    Change-Id: Ia05cfd21a3d78955ff70933995e93bbe59e3bb3b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1970301
    Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
    Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
    Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#726995}
    2e8a62b7
fake_blob.h 1.4 KB