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

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

Issue 1911093002: Remove incorrect DCHECK in RequestOpenURL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 return GetContentClient()->browser()->ShouldAssignSiteForURL(url); 640 return GetContentClient()->browser()->ShouldAssignSiteForURL(url);
641 } 641 }
642 642
643 void NavigatorImpl::RequestOpenURL(RenderFrameHostImpl* render_frame_host, 643 void NavigatorImpl::RequestOpenURL(RenderFrameHostImpl* render_frame_host,
644 const GURL& url, 644 const GURL& url,
645 SiteInstance* source_site_instance, 645 SiteInstance* source_site_instance,
646 const Referrer& referrer, 646 const Referrer& referrer,
647 WindowOpenDisposition disposition, 647 WindowOpenDisposition disposition,
648 bool should_replace_current_entry, 648 bool should_replace_current_entry,
649 bool user_gesture) { 649 bool user_gesture) {
650 // This call only makes sense for subframes if OOPIFs are possible. 650 // Note: This can be called for subframes (even when OOPIFs are not possible)
651 DCHECK(!render_frame_host->GetParent() || 651 // if the disposition calls for a different window.
652 SiteIsolationPolicy::AreCrossProcessFramesPossible());
653 652
654 // Only the current RenderFrameHost should be sending an OpenURL request. 653 // Only the current RenderFrameHost should be sending an OpenURL request.
655 // Pending RenderFrameHost should know where it is navigating and pending 654 // Pending RenderFrameHost should know where it is navigating and pending
656 // deletion RenderFrameHost shouldn't be trying to navigate. 655 // deletion RenderFrameHost shouldn't be trying to navigate.
657 if (render_frame_host != 656 if (render_frame_host !=
658 render_frame_host->frame_tree_node()->current_frame_host()) { 657 render_frame_host->frame_tree_node()->current_frame_host()) {
659 return; 658 return;
660 } 659 }
661 660
662 SiteInstance* current_site_instance = render_frame_host->GetSiteInstance(); 661 SiteInstance* current_site_instance = render_frame_host->GetSiteInstance();
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 if (pending_entry != controller_->GetVisibleEntry() || 1105 if (pending_entry != controller_->GetVisibleEntry() ||
1107 !should_preserve_entry) { 1106 !should_preserve_entry) {
1108 controller_->DiscardPendingEntry(true); 1107 controller_->DiscardPendingEntry(true);
1109 1108
1110 // Also force the UI to refresh. 1109 // Also force the UI to refresh.
1111 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1110 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1112 } 1111 }
1113 } 1112 }
1114 1113
1115 } // namespace content 1114 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698