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

Issue 2372323003: Keep web popups opened from extensions in same BrowsingInstance. (Closed)

Created:
4 years, 2 months ago by alexmos
Modified:
4 years, 2 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Keep web popups opened from extensions in same BrowsingInstance. Previously, popups for web URLs opened from extensions ended up in a separate BrowsingInstance, which prevented the popup from communicating to its opener via window.opener. This is a legitimate use case for something like OAuth, so this CL relaxes that restriction and allows them to coexist in the same BrowsingInstance. (The popup will still be put into a separate SiteInstance and have process isolation thanks to --isolate-extensions.) The same is done for one extension opening a popup to another extension. Two checks had to be changed to avoid the BrowsingInstance swap. One is ChromeContentBrowserClientExtensionsPart:: ShouldSwapBrowsingInstancesForNavigation, which now only forces a BrowsingInstance swap when navigating to/from CWS. The other deals with WebUI. Since all packaged extensions are considered to need WebUI, whether or not they actually need WebUI bindings (see ExtensionWebUI and UseWebUIForURL), the WebUI checks in RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation were relaxed to only require a BrowsingInstance swap when there's a change in WebUI bindings. BUG=590068 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/1f48ef6ac2070ccd99c1c54729602e249c4369d6 Cr-Commit-Position: refs/heads/master@{#423361}

Patch Set 1 #

Patch Set 2 : Fix test (transitions to/from incognito should always swap BrowsingInstances) #

Patch Set 3 : Cleanup and profile check #

Patch Set 4 : One more fix #

Total comments: 11

Patch Set 5 : Charlie's comments #

Total comments: 4

Patch Set 6 : Devlin's comments #

Patch Set 7 : Detect profile mismatch earlier, in chrome::Navigate #

Patch Set 8 : Fix another test (ExtensionApiTest.TabQuery) #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -26 lines) Patch
M chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc View 1 2 3 4 1 chunk +24 lines, -23 lines 0 comments Download
M chrome/browser/extensions/process_manager_browsertest.cc View 1 2 3 4 5 2 chunks +120 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_navigator.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -1 line 3 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 5 6 3 chunks +21 lines, -2 lines 2 comments Download

Messages

Total messages: 57 (40 generated)
alexmos
Charlie, can you please take a look? https://codereview.chromium.org/2372323003/diff/60001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/2372323003/diff/60001/content/browser/frame_host/render_frame_host_manager.cc#newcode1086 content/browser/frame_host/render_frame_host_manager.cc:1086: Oops - ...
4 years, 2 months ago (2016-09-29 16:59:19 UTC) #18
Charlie Reis
Nice, LGTM! In case we want to merge this to M54, can you check that ...
4 years, 2 months ago (2016-09-29 21:16:10 UTC) #19
alexmos
Thanks! > In case we want to merge this to M54, can you check that ...
4 years, 2 months ago (2016-09-30 00:08:11 UTC) #20
alexmos
Devlin, can you please review chrome/browser/extensions for OWNERS?
4 years, 2 months ago (2016-09-30 00:09:28 UTC) #22
Devlin
lgtm https://codereview.chromium.org/2372323003/diff/80001/chrome/browser/extensions/process_manager_browsertest.cc File chrome/browser/extensions/process_manager_browsertest.cc (right): https://codereview.chromium.org/2372323003/diff/80001/chrome/browser/extensions/process_manager_browsertest.cc#newcode833 chrome/browser/extensions/process_manager_browsertest.cc:833: NavigateToURL(extension->url().Resolve("empty.html")); nit: extension->GetResourceURL() https://codereview.chromium.org/2372323003/diff/80001/chrome/browser/extensions/process_manager_browsertest.cc#newcode889 chrome/browser/extensions/process_manager_browsertest.cc:889: const GURL extension_url(extension->url().Resolve("empty.html")); ...
4 years, 2 months ago (2016-10-01 00:54:58 UTC) #23
alexmos
Thanks! https://codereview.chromium.org/2372323003/diff/80001/chrome/browser/extensions/process_manager_browsertest.cc File chrome/browser/extensions/process_manager_browsertest.cc (right): https://codereview.chromium.org/2372323003/diff/80001/chrome/browser/extensions/process_manager_browsertest.cc#newcode833 chrome/browser/extensions/process_manager_browsertest.cc:833: NavigateToURL(extension->url().Resolve("empty.html")); On 2016/10/01 00:54:58, Devlin (catching up) wrote: ...
4 years, 2 months ago (2016-10-03 20:13:17 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2372323003/100001
4 years, 2 months ago (2016-10-03 20:13:38 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/308867)
4 years, 2 months ago (2016-10-03 22:26:57 UTC) #29
alexmos
Charlie, can you please take another look at the PS6-PS8 diff? There was another test ...
4 years, 2 months ago (2016-10-04 21:24:44 UTC) #38
Charlie Reis
Thanks for the explanations! (I think I follow most of it.) :) Updated patch LGTM.
4 years, 2 months ago (2016-10-05 22:51:18 UTC) #39
alexmos
sky@: can you please review browser_navigator.cc for owners? Ideally this would land today in time ...
4 years, 2 months ago (2016-10-05 22:59:13 UTC) #46
Lei Zhang
lgtm https://codereview.chromium.org/2372323003/diff/140001/chrome/browser/ui/browser_navigator.cc File chrome/browser/ui/browser_navigator.cc (right): https://codereview.chromium.org/2372323003/diff/140001/chrome/browser/ui/browser_navigator.cc#newcode251 chrome/browser/ui/browser_navigator.cc:251: if (params->source_site_instance) { On 2016/10/04 21:24:44, alexmos wrote: ...
4 years, 2 months ago (2016-10-06 00:36:47 UTC) #50
alexmos
Thanks Lei! (sky@: no need for review anymore, as Lei took care of it, though ...
4 years, 2 months ago (2016-10-06 00:42:01 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2372323003/140001
4 years, 2 months ago (2016-10-06 00:43:25 UTC) #53
Lei Zhang
On 2016/10/06 00:42:01, alexmos wrote: > Thanks! I'll add the comment in a followup so ...
4 years, 2 months ago (2016-10-06 00:43:40 UTC) #54
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 2 months ago (2016-10-06 00:52:11 UTC) #55
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 00:53:38 UTC) #57
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/1f48ef6ac2070ccd99c1c54729602e249c4369d6
Cr-Commit-Position: refs/heads/master@{#423361}

Powered by Google App Engine
This is Rietveld 408576698