Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Issue 692973005: Pass origin information for remote frame creation. (Closed)

Created:
6 years, 1 month ago by alexmos
Modified:
6 years ago
Reviewers:
Charlie Reis, dcheng, nasko
CC:
aboxhall+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, jam, mkwst+moarreviews-ipc_chromium.org, mkwst+moarreviews-renderer_chromium.org, nasko+codewatch_chromium.org, plundblad+watch_chromium.org, site-isolation-reviews_chromium.org, yuzo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Pass origin information for remote frame creation. This is the first step towards making origin information available for RemoteFrames in Blink. This CL ensures that we pass origin information whenever we create a RemoteFrame, which is currently three cases: 1. New view 2. As part of SwapOut 3. NewFrameProxy message The origins are tracked on FrameTreeNodes in the browser process and updated when frame navigations commit (in NavigatorImpl::DidNavigate). This CL doesn't yet address these issues, to be fixed in later CLs: - situations that will require an explicit "origin update" message, including document.domain changes and certain frame navigations. - iframe sandbox flags - RenderFrameProxies aren't created in all cases (crbug.com/423587) - for now, the origin on the browser side is a url::Origin which doesn't support calls like canAccess. Eventually, we may need to use a richer origin class (like WebSecurityOrigin from Blink). More information: https://docs.google.com/a/chromium.org/document/d/1Y0s76YK0ziiL8hddiFlNUyAF4hqRAGpZM8cfnnLsZPg/edit#heading=h.lrzgurbjttfm The Blink-side of this CL is: https://codereview.chromium.org/520213002/ BUG=426512 Committed: https://crrev.com/bc7eafaba8bde63d70a270ee71a901545d9769f9 Cr-Commit-Position: refs/heads/master@{#307138}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 55

Patch Set 8 : Address review feedback; send origins with DidCommitProvisionalLoad #

Total comments: 30

Patch Set 9 : Second round of feedback #

Total comments: 2

Patch Set 10 : Rebase #

Patch Set 11 : Add EXPECT_TRUE to NavigateToURL in new tests; nits #

Total comments: 22

Patch Set 12 : Address Nasko's comments #

Total comments: 2

Patch Set 13 : Nit #

Patch Set 14 : Rebase #

Patch Set 15 : Post-rebase tweak (move #include) #

Patch Set 16 : Fix test failures for content:// URLs on Android #

Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -27 lines) Patch
M content/browser/frame_host/frame_tree_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +90 lines, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.h View 1 2 3 4 5 6 7 8 3 chunks +14 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_frame_proxy_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +16 lines, -4 lines 0 comments Download
A content/common/frame_replication_state.h View 1 2 3 4 5 6 7 8 1 chunk +29 lines, -0 lines 0 comments Download
A + content/common/frame_replication_state.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/test/render_view_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/accessibility/renderer_accessibility_browsertest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +4 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +25 lines, -1 line 0 comments Download
M content/renderer/render_frame_proxy.h View 1 2 3 4 5 6 7 8 11 4 chunks +10 lines, -4 lines 0 comments Download
M content/renderer/render_frame_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +14 lines, -1 line 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +7 lines, -5 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +45 lines, -3 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (7 generated)
alexmos
Hey Charlie, could you please review this CL, which is the content side of my ...
6 years, 1 month ago (2014-11-12 00:05:47 UTC) #2
dcheng
I didn't take a detailed look, but one high-level comment and one random comment about ...
6 years, 1 month ago (2014-11-12 22:16:44 UTC) #4
alexmos
On 2014/11/12 22:16:44, dcheng wrote: > I didn't take a detailed look, but one high-level ...
6 years, 1 month ago (2014-11-12 23:10:06 UTC) #5
Charlie Reis
Nice! I'm really happy that we'll end up with a general struct with data to ...
6 years, 1 month ago (2014-11-13 18:00:59 UTC) #6
alexmos
Thanks for the comments, Charlie! PTAL - I've uploaded PS8. As we've discussed, I've changed ...
6 years, 1 month ago (2014-11-18 18:25:33 UTC) #7
alexmos
Answering two more questions: > I noticed that we're not updating the replication state after ...
6 years, 1 month ago (2014-11-18 18:54:25 UTC) #8
ncarter (slow)
https://codereview.chromium.org/692973005/diff/140001/content/common/frame_replication_state.h File content/common/frame_replication_state.h (right): https://codereview.chromium.org/692973005/diff/140001/content/common/frame_replication_state.h#newcode6 content/common/frame_replication_state.h:6: #define CONTENT_FRAME_REPLICATION_STATE_H_ This should be CONTENT_COMMON_FRAME_REPLICATION_STATE_H_
6 years, 1 month ago (2014-11-18 20:59:02 UTC) #10
Charlie Reis
Great-- this looks almost ready to go. A few minor things below. https://codereview.chromium.org/692973005/diff/120001/content/browser/frame_host/frame_tree_browsertest.cc File content/browser/frame_host/frame_tree_browsertest.cc ...
6 years, 1 month ago (2014-11-19 00:46:18 UTC) #11
dcheng
https://codereview.chromium.org/692973005/diff/140001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/692973005/diff/140001/content/renderer/render_view_impl.cc#newcode780 content/renderer/render_view_impl.cc:780: // In --site-per-process, initialize the WebRemoteFrame with information Any ...
6 years, 1 month ago (2014-11-19 00:50:11 UTC) #12
alexmos
Please take a look at PS9. https://codereview.chromium.org/692973005/diff/140001/content/browser/frame_host/frame_tree_browsertest.cc File content/browser/frame_host/frame_tree_browsertest.cc (right): https://codereview.chromium.org/692973005/diff/140001/content/browser/frame_host/frame_tree_browsertest.cc#newcode207 content/browser/frame_host/frame_tree_browsertest.cc:207: NavigateToURL(shell(), main_url); On ...
6 years, 1 month ago (2014-11-19 02:49:27 UTC) #13
Charlie Reis
Great. LGTM once you rebase and add the EXPECT_TRUEs in the test. On 2014/11/18 18:54:25, ...
6 years, 1 month ago (2014-11-19 19:31:47 UTC) #14
alexmos
Thanks for all the comments! > Great. LGTM once you rebase and add the EXPECT_TRUEs ...
6 years, 1 month ago (2014-11-20 00:29:28 UTC) #15
Charlie Reis
Still LGTM. You'll need an IPC owner as well, like nasko@. https://codereview.chromium.org/692973005/diff/200001/content/renderer/render_frame_proxy.cc File content/renderer/render_frame_proxy.cc (right): ...
6 years, 1 month ago (2014-11-20 17:20:28 UTC) #16
nasko
Few more comments, mostly minor. https://codereview.chromium.org/692973005/diff/200001/content/browser/frame_host/frame_tree_browsertest.cc File content/browser/frame_host/frame_tree_browsertest.cc (right): https://codereview.chromium.org/692973005/diff/200001/content/browser/frame_host/frame_tree_browsertest.cc#newcode204 content/browser/frame_host/frame_tree_browsertest.cc:204: host_resolver()->AddRule("*", "127.0.0.1"); Let's use ...
6 years, 1 month ago (2014-11-20 17:22:55 UTC) #17
ncarter (slow)
https://codereview.chromium.org/692973005/diff/200001/content/browser/frame_host/frame_tree_browsertest.cc File content/browser/frame_host/frame_tree_browsertest.cc (right): https://codereview.chromium.org/692973005/diff/200001/content/browser/frame_host/frame_tree_browsertest.cc#newcode204 content/browser/frame_host/frame_tree_browsertest.cc:204: host_resolver()->AddRule("*", "127.0.0.1"); On 2014/11/20 17:22:54, nasko wrote: > Let's ...
6 years, 1 month ago (2014-11-20 20:50:45 UTC) #19
alexmos
https://codereview.chromium.org/692973005/diff/200001/content/browser/frame_host/frame_tree_browsertest.cc File content/browser/frame_host/frame_tree_browsertest.cc (right): https://codereview.chromium.org/692973005/diff/200001/content/browser/frame_host/frame_tree_browsertest.cc#newcode204 content/browser/frame_host/frame_tree_browsertest.cc:204: host_resolver()->AddRule("*", "127.0.0.1"); On 2014/11/20 17:22:54, nasko wrote: > Let's ...
6 years, 1 month ago (2014-11-20 21:09:10 UTC) #20
nasko
LGTM with one nit. https://codereview.chromium.org/692973005/diff/200001/content/browser/frame_host/frame_tree_browsertest.cc File content/browser/frame_host/frame_tree_browsertest.cc (right): https://codereview.chromium.org/692973005/diff/200001/content/browser/frame_host/frame_tree_browsertest.cc#newcode204 content/browser/frame_host/frame_tree_browsertest.cc:204: host_resolver()->AddRule("*", "127.0.0.1"); On 2014/11/20 21:09:10, ...
6 years, 1 month ago (2014-11-20 21:21:21 UTC) #21
alexmos
Thanks for reviewing! https://codereview.chromium.org/692973005/diff/220001/content/renderer/render_view_browsertest.cc File content/renderer/render_view_browsertest.cc (right): https://codereview.chromium.org/692973005/diff/220001/content/renderer/render_view_browsertest.cc#newcode696 content/renderer/render_view_browsertest.cc:696: replication_state.origin = url::Origin("null"); On 2014/11/20 21:21:21, ...
6 years, 1 month ago (2014-11-20 21:55:14 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/692973005/280001
6 years ago (2014-12-02 00:12:20 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/33252)
6 years ago (2014-12-02 02:02:23 UTC) #26
alexmos
Charlie, could you please take a look at the tweak in PS16? This hopefully gets ...
6 years ago (2014-12-05 23:48:15 UTC) #27
Charlie Reis
On 2014/12/05 23:48:15, alexmos wrote: > Charlie, could you please take a look at the ...
6 years ago (2014-12-06 00:01:21 UTC) #28
alexmos
On 2014/12/06 00:01:21, Charlie Reis wrote: > On 2014/12/05 23:48:15, alexmos wrote: > > Charlie, ...
6 years ago (2014-12-06 00:32:33 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/692973005/300001
6 years ago (2014-12-06 00:33:26 UTC) #31
commit-bot: I haz the power
Committed patchset #16 (id:300001)
6 years ago (2014-12-06 01:38:18 UTC) #32
commit-bot: I haz the power
6 years ago (2014-12-06 01:39:05 UTC) #33
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/bc7eafaba8bde63d70a270ee71a901545d9769f9
Cr-Commit-Position: refs/heads/master@{#307138}

Powered by Google App Engine
This is Rietveld 408576698