• Nick Carter's avatar
    Allow extension process reuse in --site-per-process; · bf6264a5
    Nick Carter authored
    make SiteIsolationPolicy public.
    
    The problem was that --site-per-process disabled extension
    process sharing, but the site-per-process base::Feature (which
    we've been field trialing) did not. This was due to the
    extensions code checking only for the flag, and not considering
    the field trial state as well.
    
    components/printing actually got the logic right, but only by
    reproducing a lot of business logic. Thus, it seems
    appropriate to move SiteIsolationPolicy to content/public,
    so that we can centralize the "what kind of oopifs are there"
    logic. For printing, this change adds a new getter function
    specific to oopif compositor, since that's basically a
    derived policy of the process model.
    
    For extensions, we've decided to disable LockToOrigin in
    --site-per-process (rather than to enable it in the feature),
    since origin-locking extensions doesn't help with the spectre
    threat, and --site-per-process is about spectre these days.
    [Charlie suggests we develop some kind of "extension isolation v2"
    proposal, maybe reviving the --isolate-extension flag for that
    purpose!]
    
    Bug: 824966, 766267
    
    Change-Id: Ibf7592c9d522fd0c99057358bcc34b5881780db8
    Reviewed-on: https://chromium-review.googlesource.com/949966
    Commit-Queue: Nick Carter <nick@chromium.org>
    Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
    Reviewed-by: default avatarWei Li <weili@chromium.org>
    Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
    Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
    Reviewed-by: default avatarŁukasz Anforowicz <lukasza@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#548645}
    bf6264a5
test_utils.cc 14.7 KB