DescriptionStart replicating sandbox flags for OOPIF.
This CL adds plumbing to replicate sandbox flags through the browser process:
* Introduce a new enum to refer to sandbox flags in content.
* Pass sandbox flags as part of FrameHostMsg_CreateChildFrame and store them in a FrameTreeNode's FrameReplicationState. Keep the older version of WebFrameClient::createChildFrame around until Blink switches over to the new version.
* Pass sandbox flags in FrameMsg_NewFrame, so that a local frame's blink::SecurityContext can be initialized with proper sandbox flags. Also initialize sandbox flags for remote frames using FrameReplicationState already passed to new RenderFrameProxies.
The corresponding Blink-side CL is: https://codereview.chromium.org/793493003/
After this CL, there will be a second Blink CL (https://codereview.chromium.org/838903002/) that will plumb correct sandbox flags into WebFrameClient::createChildFrame(); this will actually enable the replication. Then, another Chromium CL (https://codereview.chromium.org/797813006/) will remove the old createChildFrame and add browsertests.
This CL doesn't cover the case where a frame's sandbox flags are modified through JavaScript and the frame is re-navigated. In this case, the renderer should tell the browser process about the updated sandbox flags with a separate IPC; this is left for a future CL.
Skipping presubmit due to a warning about IPC_ENUM_TRAITS, which was discussed and approved in comments.
BUG=426512
NOPRESUBMIT=true
Committed: https://crrev.com/e48b1df9331ba5a366c09f86032e824d59d517ac
Cr-Commit-Position: refs/heads/master@{#311808}
Patch Set 1 #Patch Set 2 : #
Total comments: 14
Patch Set 3 : Improve comment for content::SandboxFlags. Change blink::WebSandboxFlags to an enum class per Daniel's suggestion. #Patch Set 4 : Rebase #Patch Set 5 : Add conversion functions for SandboxFlags #
Total comments: 7
Patch Set 6 : Address Charlie's nits #Patch Set 7 : Use a macro to assert that content and Web SandboxFlags are in sync #Patch Set 8 : Nit #Patch Set 9 : Rebase #Patch Set 10 : Fix OnCreateChildFrame usage in unit tests #
Total comments: 4
Patch Set 11 : Address Nasko's nit #Messages
Total messages: 26 (9 generated)
|