OLD | NEW |
---|---|
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/navigator_impl.h" | 5 #include "content/browser/frame_host/navigator_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
612 bool user_gesture) { | 612 bool user_gesture) { |
613 // This call only makes sense for subframes if OOPIFs are possible. | 613 // This call only makes sense for subframes if OOPIFs are possible. |
614 DCHECK(!render_frame_host->GetParent() || | 614 DCHECK(!render_frame_host->GetParent() || |
615 SiteIsolationPolicy::AreCrossProcessFramesPossible()); | 615 SiteIsolationPolicy::AreCrossProcessFramesPossible()); |
616 | 616 |
617 // If this came from a swapped out RenderFrameHost, we only allow the request | 617 // If this came from a swapped out RenderFrameHost, we only allow the request |
618 // if we are still in the same BrowsingInstance. | 618 // if we are still in the same BrowsingInstance. |
619 SiteInstance* current_site_instance = render_frame_host->frame_tree_node() | 619 SiteInstance* current_site_instance = render_frame_host->frame_tree_node() |
620 ->current_frame_host() | 620 ->current_frame_host() |
621 ->GetSiteInstance(); | 621 ->GetSiteInstance(); |
622 if (render_frame_host->is_swapped_out() && | 622 if (!render_frame_host->GetSiteInstance()->IsRelatedSiteInstance( |
Charlie Reis
2016/03/14 20:12:57
This looks wrong. Before this block was unreachab
nasko
2016/03/14 21:32:30
Ah, good point. We don't need the check overall, a
| |
623 !render_frame_host->GetSiteInstance()->IsRelatedSiteInstance( | |
624 current_site_instance)) { | 623 current_site_instance)) { |
625 return; | 624 return; |
626 } | 625 } |
627 | 626 |
628 // TODO(creis): Pass the redirect_chain into this method to support client | 627 // TODO(creis): Pass the redirect_chain into this method to support client |
629 // redirects. http://crbug.com/311721. | 628 // redirects. http://crbug.com/311721. |
630 std::vector<GURL> redirect_chain; | 629 std::vector<GURL> redirect_chain; |
631 | 630 |
632 GURL dest_url(url); | 631 GURL dest_url(url); |
633 if (!GetContentClient()->browser()->ShouldAllowOpenURL( | 632 if (!GetContentClient()->browser()->ShouldAllowOpenURL( |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1121 if (pending_entry != controller_->GetVisibleEntry() || | 1120 if (pending_entry != controller_->GetVisibleEntry() || |
1122 !should_preserve_entry) { | 1121 !should_preserve_entry) { |
1123 controller_->DiscardPendingEntry(true); | 1122 controller_->DiscardPendingEntry(true); |
1124 | 1123 |
1125 // Also force the UI to refresh. | 1124 // Also force the UI to refresh. |
1126 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); | 1125 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); |
1127 } | 1126 } |
1128 } | 1127 } |
1129 | 1128 |
1130 } // namespace content | 1129 } // namespace content |
OLD | NEW |