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

Issue 1208143002: Move existing kSitePerProcess checks to a policy-oracle object (Closed)

Created:
5 years, 6 months ago by ncarter (slow)
Modified:
5 years, 4 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, plundblad+watch_chromium.org, extensions-reviews_chromium.org, aboxhall+watch_chromium.org, nektar+watch_chromium.org, nasko+codewatch_chromium.org, yuzo+watch_chromium.org, je_julie, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, ajwong+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, chromium-apps-reviews_chromium.org, site-isolation-reviews_chromium.org, lazyboy
Base URL:
https://chromium.googlesource.com/chromium/src.git@swapped_out_cmdline_checks
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move existing kSitePerProcess checks to a policy-oracle object Introduces SiteIsolationPolicy, which interprets the kSitePerProcess switch (and eventually others too), in order to make decisions about oopifs, oopif-related features, and site isolation policy. Replace explicit calls to HasSwitch(content::kSitePerProcess) with calls to appropriate methods of SiteIsolationPolicy, BrowserPluginGuestMode, or content's browser_test_utils. SiteIsolationPolicy is content-internal, and I expect it eventually to become a stateful object. There are six cases: 1. SiteIsolationPolicy::DoesSiteRequireDedicatedProcess(url) This anticipates site isolation being launched for a subset of sites/schemes. 2. BrowserPluginGuestMode::UseCrossProcessFramesForGuests() Tracks some current feature work that requires out of process iframes and so piggybacks on --site-per-process. We ought to control this by a different flag 3. SiteIsolationPolicy::AreCrossProcessFramesPossible() For dchecks and determining whether to create proxies -- basically it is the "or" of all of the above functions. 4. SiteIsolationPolicy::UseSubframeNavigationEntries() Tracks some current feature work related to navigation, that's tied to --site- per-process. Expected to be shortlived. 5. IsSwappedOutStateForbidden() (on RFHM/RFProxy) Another class of temporary feature work. 6. content::AreAllSitesIsolatedForTesting() For bailing out of tests. BUG=481066 Committed: https://crrev.com/d30fd969388ba0ffe122eb63c22776aa02a8836f Cr-Commit-Position: refs/heads/master@{#340570}

Patch Set 1 #

Patch Set 2 : First pass at self review fixes. #

Patch Set 3 : Self-review changes. #

Patch Set 4 : Fix the bug. #

Patch Set 5 : Rebase. #

Patch Set 6 : More fixes." #

Patch Set 7 : Fix some compile errors in guest code #

Patch Set 8 : Final (?) self review fixes. #

Patch Set 9 : rparen #

Total comments: 51

Patch Set 10 : Partial fixes to Nasko's comments. #

Total comments: 30

Patch Set 11 : Respond to all comments #

Patch Set 12 : #

Patch Set 13 : Fix two new kSitePerProcess instances. #

Patch Set 14 : Remove errant semicolon. #

Patch Set 15 : Re-rebase (to 7/20) #

Patch Set 16 : Fix some includes #

Total comments: 16

Patch Set 17 : Rebase. #

Patch Set 18 : Charlie fixes. #

Patch Set 19 : Fix compile. #

Patch Set 20 : Add newline at EOF. #

Patch Set 21 : Reformat. #

Patch Set 22 : Sync & resolve midair collision. #

Total comments: 2

Patch Set 23 : // Verify subframe entries if they're enabled (e.g. in --site-per-process). #

Patch Set 24 : Fix new instances of kSitePerProcess. #

Patch Set 25 : Attempt to fix compile. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+486 lines, -386 lines) Patch
M chrome/browser/chrome_content_browser_client_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/chrome_site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/app_process_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/password_manager/password_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/task_manager/task_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M components/guest_view/browser/guest_view_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +2 lines, -4 lines 0 comments Download
M components/guest_view/renderer/iframe_guest_view_container.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -4 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +8 lines, -12 lines 0 comments Download
M content/browser/child_process_security_policy_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M content/browser/cross_site_transfer_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/frame_host/frame_tree.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +0 lines, -2 lines 0 comments Download
M content/browser/frame_host/frame_tree_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 7 chunks +6 lines, -11 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 26 chunks +43 lines, -69 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +13 lines, -18 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 6 chunks +7 lines, -10 lines 0 comments Download
M content/browser/frame_host/navigator_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +3 lines, -6 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 14 15 16 17 18 19 20 21 22 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 13 chunks +38 lines, -38 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -8 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +3 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +2 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/loader/cross_site_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 6 chunks +43 lines, -35 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_message_filter_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +9 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_process_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -5 lines 0 comments Download
M content/browser/site_instance_impl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/site_instance_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +12 lines, -7 lines 0 comments Download
M content/browser/site_instance_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +3 lines, -5 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/opened_by_dom_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 6 chunks +6 lines, -11 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
A content/common/site_isolation_policy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +64 lines, -0 lines 0 comments Download
A content/common/site_isolation_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +30 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 14 15 16 17 18 19 20 21 22 5 chunks +7 lines, -3 lines 0 comments Download
M content/public/browser/site_instance.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +44 lines, -31 lines 0 comments Download
A content/public/common/browser_plugin_guest_mode.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +28 lines, -0 lines 0 comments Download
A content/public/common/browser_plugin_guest_mode.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +18 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +14 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +10 lines, -0 lines 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 16 17 18 19 20 21 22 14 chunks +25 lines, -39 lines 0 comments Download
M content/renderer/render_frame_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -3 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 14 15 16 17 18 19 20 21 22 2 chunks +2 lines, -3 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 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -2 lines 0 comments Download
M extensions/renderer/dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +4 lines, -6 lines 0 comments Download

Messages

Total messages: 31 (9 generated)
ncarter (slow)
nasko: please review -- you'll want to start with site_isolation_policy.h, and site_instance.h, before starting at ...
5 years, 5 months ago (2015-07-06 23:04:48 UTC) #2
nasko
Thanks for taking this on! A bunch of comments, but mostly nits. https://codereview.chromium.org/1208143002/diff/160001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc ...
5 years, 5 months ago (2015-07-08 12:52:24 UTC) #3
ncarter (slow)
https://codereview.chromium.org/1208143002/diff/160001/content/public/browser/site_instance.h File content/public/browser/site_instance.h (right): https://codereview.chromium.org/1208143002/diff/160001/content/public/browser/site_instance.h#newcode52 content/public/browser/site_instance.h:52: // just one site, allowing the same origin policy ...
5 years, 5 months ago (2015-07-08 23:28:38 UTC) #4
Charlie Reis
[+site-isolation-reviews] I haven't looked at most of this yet (though I'm excited to once Nasko's ...
5 years, 5 months ago (2015-07-08 23:42:59 UTC) #6
ncarter (slow)
I didn't respond to all of nasko's comments yet, but have uploaded some fixes. I'd ...
5 years, 5 months ago (2015-07-10 23:29:19 UTC) #7
jam
driveby: the new methods in content/public aren't all used by outside content. why are they ...
5 years, 5 months ago (2015-07-13 21:53:25 UTC) #8
Charlie Reis
[+lazyboy to CC for GuestsShouldUseCrossProcessFrames] Nice. I'm pretty happy with the buckets you've chosen. I ...
5 years, 5 months ago (2015-07-13 22:13:13 UTC) #9
ncarter (slow)
Please take another look. I think I've addressed everything. And to jam's comment: I've broken ...
5 years, 5 months ago (2015-07-20 17:45:46 UTC) #10
Charlie Reis
A few minor comments below and it looks like patch set 16 failed to apply, ...
5 years, 5 months ago (2015-07-21 16:58:24 UTC) #11
ncarter (slow)
All should be addressed. Things compile locally so I'm redoing the tryjobs, then I'll add ...
5 years, 5 months ago (2015-07-22 23:29:08 UTC) #12
nasko
LGTM https://codereview.chromium.org/1208143002/diff/160001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/1208143002/diff/160001/chrome/renderer/chrome_content_renderer_client.cc#newcode1404 chrome/renderer/chrome_content_renderer_client.cc:1404: // |opener_frame|/its ancestors. On 2015/07/10 23:29:18, ncarter wrote: ...
5 years, 5 months ago (2015-07-23 14:29:21 UTC) #13
ncarter (slow)
+lazyboy to make sure you're okay the proposed "browser_plugin_guest_mode.h" file, which wound up being the ...
5 years, 5 months ago (2015-07-23 16:43:08 UTC) #16
lazyboy
lgtm https://codereview.chromium.org/1208143002/diff/420001/content/public/common/browser_plugin_guest_mode.h File content/public/common/browser_plugin_guest_mode.h (right): https://codereview.chromium.org/1208143002/diff/420001/content/public/common/browser_plugin_guest_mode.h#newcode15 content/public/common/browser_plugin_guest_mode.h:15: // Returns true if <webview> should be implemented ...
5 years, 5 months ago (2015-07-23 19:36:44 UTC) #17
jam
https://codereview.chromium.org/1208143002/diff/420001/content/public/common/browser_plugin_guest_mode.h File content/public/common/browser_plugin_guest_mode.h (right): https://codereview.chromium.org/1208143002/diff/420001/content/public/common/browser_plugin_guest_mode.h#newcode19 content/public/common/browser_plugin_guest_mode.h:19: static bool UseCrossProcessFramesForGuests(); is there no other place to ...
5 years, 5 months ago (2015-07-24 17:07:36 UTC) #18
ncarter (slow)
On 2015/07/24 17:07:36, jam wrote: > https://codereview.chromium.org/1208143002/diff/420001/content/public/common/browser_plugin_guest_mode.h > File content/public/common/browser_plugin_guest_mode.h (right): > > https://codereview.chromium.org/1208143002/diff/420001/content/public/common/browser_plugin_guest_mode.h#newcode19 > ...
5 years, 5 months ago (2015-07-24 17:21:59 UTC) #19
jabdelmalek
On 2015/07/24 17:21:59, ncarter wrote: > On 2015/07/24 17:07:36, jam wrote: > > > https://codereview.chromium.org/1208143002/diff/420001/content/public/common/browser_plugin_guest_mode.h ...
5 years, 4 months ago (2015-07-27 17:14:28 UTC) #20
jam
lgtm
5 years, 4 months ago (2015-07-27 17:21:12 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1208143002/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1208143002/460001
5 years, 4 months ago (2015-07-27 17:40:01 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_dbg/builds/96025)
5 years, 4 months ago (2015-07-27 17:52:17 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1208143002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1208143002/480001
5 years, 4 months ago (2015-07-27 19:12:46 UTC) #29
commit-bot: I haz the power
Committed patchset #25 (id:480001)
5 years, 4 months ago (2015-07-27 21:51:17 UTC) #30
commit-bot: I haz the power
5 years, 4 months ago (2015-07-27 21:51:51 UTC) #31
Message was sent while issue was closed.
Patchset 25 (id:??) landed as
https://crrev.com/d30fd969388ba0ffe122eb63c22776aa02a8836f
Cr-Commit-Position: refs/heads/master@{#340570}

Powered by Google App Engine
This is Rietveld 408576698