• Emily Stark's avatar
    Display precursor origins when applicable in external protocol dialog · 7cfe6fc5
    Emily Stark authored
    External protocol dialogs display the origin that initiated the
    external protocol request. The initiating origin helps the user
    attribute the request to a particular site, so that they can decide if
    they can trust that site to launch an external application. When the
    initiating origin was opaque (such as from a sandboxed iframe), the
    dialog would display no origin or a generic message, so the user
    didn't have any information for making a trust decision. This CL
    converts the initiating origin to its precursor origin (the origin
    that created the initiating origin) when creating the external
    protocol dialog. Displaying the precursor origin gives the user more
    useful information for making a trust decision.
    
    Bug: 1041749
    Change-Id: I0b21d20e13d7d71db361746dbb18df8d980339bd
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2063420
    Commit-Queue: Emily Stark <estark@chromium.org>
    Reviewed-by: default avatarMustafa Emre Acer <meacer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#742492}
    7cfe6fc5
external_protocol_handler_unittest.cc 14.1 KB