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

Issue 248963007: Perform navigation policy check on UI thread for --site-per-process. (Closed)

Created:
6 years, 8 months ago by nasko
Modified:
6 years, 8 months ago
Reviewers:
Charlie Reis, awong, dcheng
CC:
chromium-reviews, darin-cc_chromium.org, jam, site-isolation-reviews_chromium.org
Visibility:
Public.

Description

Perform navigation policy check on UI thread for --site-per-process. This CL adds a NavigateFrameToURL method, which will allow browser tests to navigate specific (sub)frames and more precise out-of-process iframes tests can be written. It also changes how cross-site transition is done for --site-per-process. It used to depend on the Referer header, but if there is a navigation to data URL, it will be empty and there will always be a transfer to new renderer. I'm changing it to do the check on the UI thread and for now to be a very simplistic one - is the URL in the same SiteInstance as the current renderer. BUG=357747 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266267

Patch Set 1 #

Patch Set 2 : Some code clean up and adding test observer. #

Patch Set 3 : Don't hop to UI thread if transfer is already required and use WeakPtr. #

Patch Set 4 : Some minor cleanup. #

Total comments: 34

Patch Set 5 : Changes based on Charlie's review. #

Total comments: 4

Patch Set 6 : Fixing nits. #

Patch Set 7 : Rebase on ToT. #

Patch Set 8 : Move NavigateFrameToURL to be internal to content/ #

Total comments: 6

Patch Set 9 : Fixing nits. #

Patch Set 10 : Rebase on ToT. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+341 lines, -28 lines) Patch
M content/browser/frame_host/interstitial_page_navigator_impl.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/frame_host/interstitial_page_navigator_impl.cc View 1 2 3 4 5 2 chunks +7 lines, -1 line 0 comments Download
M content/browser/frame_host/navigator.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigator.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigator_impl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/loader/cross_site_resource_handler.h View 1 2 3 4 5 3 chunks +14 lines, -0 lines 0 comments Download
M content/browser/loader/cross_site_resource_handler.cc View 1 2 3 4 6 chunks +65 lines, -20 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 3 chunks +32 lines, -7 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
A content/test/content_browser_test_utils_internal.h View 1 2 3 4 5 6 7 1 chunk +25 lines, -0 lines 0 comments Download
A content/test/content_browser_test_utils_internal.cc View 1 2 3 4 5 6 7 1 chunk +23 lines, -0 lines 0 comments Download
A content/test/test_frame_navigation_observer.h View 1 2 3 4 1 chunk +75 lines, -0 lines 0 comments Download
A content/test/test_frame_navigation_observer.cc View 1 2 3 4 1 chunk +80 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
nasko
Hey Charlie, I think this CL is ready for review. Thanks, Nasko
6 years, 8 months ago (2014-04-24 19:02:34 UTC) #1
nasko
Adding site-isolation-reviews@.
6 years, 8 months ago (2014-04-24 19:03:19 UTC) #2
Charlie Reis
Cool-- I'm excited to have the new test function working so nicely. There's a lot ...
6 years, 8 months ago (2014-04-24 20:37:50 UTC) #3
nasko
Fixes for all comments. dcheng@, can you review the usage of PostTaskAndReplyWithResult? https://codereview.chromium.org/248963007/diff/50001/content/browser/loader/cross_site_resource_handler.cc File content/browser/loader/cross_site_resource_handler.cc ...
6 years, 8 months ago (2014-04-24 22:31:12 UTC) #4
awong
LGTM for PTAR usage. It's pretty much a textbook invocation of PTAR to execute a ...
6 years, 8 months ago (2014-04-24 23:00:35 UTC) #5
dcheng
PostTaskAndReplyWithResult usage lgtm
6 years, 8 months ago (2014-04-24 23:04:11 UTC) #6
Charlie Reis
Thanks! Looks like there's a merge conflict, but otherwise LGTM with the nits below. https://codereview.chromium.org/248963007/diff/70001/content/browser/frame_host/navigator.h ...
6 years, 8 months ago (2014-04-24 23:17:49 UTC) #7
nasko
Fixed nits and merge conflict. https://codereview.chromium.org/248963007/diff/70001/content/browser/frame_host/navigator.h File content/browser/frame_host/navigator.h (right): https://codereview.chromium.org/248963007/diff/70001/content/browser/frame_host/navigator.h#newcode38 content/browser/frame_host/navigator.h:38: virtual NavigationController* GetController(); On ...
6 years, 8 months ago (2014-04-24 23:29:34 UTC) #8
nasko
The CQ bit was checked by nasko@chromium.org
6 years, 8 months ago (2014-04-24 23:29:39 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nasko@chromium.org/248963007/110001
6 years, 8 months ago (2014-04-24 23:31:01 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-25 00:36:57 UTC) #11
commit-bot: I haz the power
Retried try job too often on android_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_dbg&number=175227
6 years, 8 months ago (2014-04-25 00:36:58 UTC) #12
Charlie Reis
The CQ bit was checked by creis@chromium.org
6 years, 8 months ago (2014-04-25 00:54:26 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nasko@chromium.org/248963007/110001
6 years, 8 months ago (2014-04-25 00:57:46 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-25 02:51:46 UTC) #15
commit-bot: I haz the power
Retried try job too often on android_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_dbg&number=175345
6 years, 8 months ago (2014-04-25 02:51:47 UTC) #16
nasko
Looking at this change, it is probably good to keep NavigateFrameToURL within content, as it ...
6 years, 8 months ago (2014-04-25 03:51:37 UTC) #17
nasko
Charlie, Can you take another look at the CL? I've moved the test method to ...
6 years, 8 months ago (2014-04-25 17:06:08 UTC) #18
Charlie Reis
LGTM with nits, assuming John's happy with the new internal test utils class. https://codereview.chromium.org/248963007/diff/140001/content/browser/frame_host/interstitial_page_navigator_impl.cc File ...
6 years, 8 months ago (2014-04-25 17:16:12 UTC) #19
nasko
Fixed nits. I discussed the move of the code with jam@ beforehand and he suggested ...
6 years, 8 months ago (2014-04-25 17:20:13 UTC) #20
nasko
The CQ bit was checked by nasko@chromium.org
6 years, 8 months ago (2014-04-25 17:20:20 UTC) #21
nasko
The CQ bit was checked by nasko@chromium.org
6 years, 8 months ago (2014-04-25 19:14:19 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nasko@chromium.org/248963007/180001
6 years, 8 months ago (2014-04-25 21:47:44 UTC) #23
commit-bot: I haz the power
6 years, 8 months ago (2014-04-25 23:01:08 UTC) #24
Message was sent while issue was closed.
Change committed as 266267

Powered by Google App Engine
This is Rietveld 408576698