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

Unified Diff: chrome/browser/ui/browser_navigator.cc

Issue 2686943002: New WebContents created via ctrl-click should be in a new process. (Closed)
Patch Set: No need to send the new boolean flag over IPC. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_navigator.cc
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 1a7e8063626468d6f4ecb99c13cc336d3efca219..507b74a059b8c3d64e34a44a4f7db62a6e60fbe6 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -354,11 +354,16 @@ class ScopedTargetContentsOwner {
content::WebContents* CreateTargetContents(const chrome::NavigateParams& params,
const GURL& url) {
- WebContents::CreateParams create_params(
- params.browser->profile(),
- params.source_site_instance
- ? params.source_site_instance
- : tab_util::GetSiteInstanceForNewTab(params.browser->profile(), url));
+ WebContents::CreateParams create_params(params.browser->profile());
+ if (params.use_new_renderer_for_new_contents) {
+ create_params.site_instance = nullptr;
Charlie Reis 2017/04/19 20:11:11 I missed this before, but is there a reason we're
Łukasz Anforowicz 2017/04/20 01:11:29 Thanks for catching this - you're right this shoul
+ } else if (params.source_site_instance) {
+ create_params.site_instance = params.source_site_instance;
+ } else {
+ create_params.site_instance =
+ tab_util::GetSiteInstanceForNewTab(params.browser->profile(), url);
+ }
+
create_params.main_frame_name = params.frame_name;
if (params.source_contents) {
create_params.initial_size =

Powered by Google App Engine
This is Rietveld 408576698