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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 2499313002: Don't split off NTP subframes with TDI. (Closed)
Patch Set: updates Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 frame_tree_node_->opener()->current_frame_host(); 1429 frame_tree_node_->opener()->current_frame_host();
1430 if (IsCurrentlySameSite(opener_frame, dest_url)) 1430 if (IsCurrentlySameSite(opener_frame, dest_url))
1431 return SiteInstanceDescriptor(opener_frame->GetSiteInstance()); 1431 return SiteInstanceDescriptor(opener_frame->GetSiteInstance());
1432 } 1432 }
1433 } 1433 }
1434 1434
1435 if (!frame_tree_node_->IsMainFrame() && 1435 if (!frame_tree_node_->IsMainFrame() &&
1436 SiteIsolationPolicy::IsTopDocumentIsolationEnabled() && 1436 SiteIsolationPolicy::IsTopDocumentIsolationEnabled() &&
1437 !SiteInstanceImpl::DoesSiteRequireDedicatedProcess(browser_context, 1437 !SiteInstanceImpl::DoesSiteRequireDedicatedProcess(browser_context,
1438 dest_url)) { 1438 dest_url)) {
1439 if (GetContentClient()
1440 ->browser()
1441 ->ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation(
1442 dest_url, current_instance)) {
1443 return SiteInstanceDescriptor(render_frame_host_->GetSiteInstance());
1444 }
1445
1439 // This is a cross-site subframe of a non-isolated origin, so place this 1446 // This is a cross-site subframe of a non-isolated origin, so place this
1440 // frame in the default subframe site instance. 1447 // frame in the default subframe site instance.
1441 return SiteInstanceDescriptor( 1448 return SiteInstanceDescriptor(
1442 browser_context, dest_url, 1449 browser_context, dest_url,
1443 SiteInstanceRelation::RELATED_DEFAULT_SUBFRAME); 1450 SiteInstanceRelation::RELATED_DEFAULT_SUBFRAME);
1444 } 1451 }
1445 1452
1446 // Start the new renderer in a new SiteInstance, but in the current 1453 // Start the new renderer in a new SiteInstance, but in the current
1447 // BrowsingInstance. 1454 // BrowsingInstance.
1448 return SiteInstanceDescriptor(browser_context, dest_url, 1455 return SiteInstanceDescriptor(browser_context, dest_url,
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2722 resolved_url)) { 2729 resolved_url)) {
2723 DCHECK(!dest_instance || 2730 DCHECK(!dest_instance ||
2724 dest_instance == render_frame_host_->GetSiteInstance()); 2731 dest_instance == render_frame_host_->GetSiteInstance());
2725 return false; 2732 return false;
2726 } 2733 }
2727 2734
2728 return true; 2735 return true;
2729 } 2736 }
2730 2737
2731 } // namespace content 2738 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698