• David Van Cleve's avatar
    Make the android-app:// scheme hierarchical · b2996bd3
    David Van Cleve authored
    This CL marks (on Android) the android-app scheme as hierarchical
    ("standard") in order for them to not get butchered by "truncate to
    origin" referrer policies, such as the new default policy (currently
    in the process of rolling out; crbug.com/1014207) of
    strict-origin-when-cross-origin.
    
    URLs of the android-app scheme are of the form
    android-app://my.package.name/some/more/information; because they're not
    "standard" (GURL) / "hierarchical" (KURL), when you take their origin
    you get an opaque origin; because they're cross-origin with everything
    else, a policy of "truncate to origin on cross-origin requests" (which
    is the new default) ends up zeroing these referrers out, which might
    not be what we want.
    
    Marking the scheme as standard means that you can meaningfully take
    the origin (usually yielding the package name), which gives the behavior
    we want.
    
    Bug: 1046384
    Change-Id: Ib5b80b197964ba2f0623699c0e33e945c20a0ba2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2024691Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Reviewed-by: default avatarPeter Conn <peconn@chromium.org>
    Commit-Queue: David Van Cleve <davidvc@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#737337}
    b2996bd3
chrome_content_client.cc 35 KB