Chromium Code Reviews| Index: content/browser/frame_host/navigation_handle_impl.cc |
| diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc |
| index b95c691e3975168323163d65aa0197dbfcc15462..88c1f52560be896cc9850d78b72476874956b7dc 100644 |
| --- a/content/browser/frame_host/navigation_handle_impl.cc |
| +++ b/content/browser/frame_host/navigation_handle_impl.cc |
| @@ -39,21 +39,20 @@ std::unique_ptr<NavigationHandleImpl> NavigationHandleImpl::Create( |
| const GURL& url, |
| FrameTreeNode* frame_tree_node, |
| bool is_renderer_initiated, |
| - bool is_synchronous, |
| + bool is_same_page, |
| bool is_srcdoc, |
| const base::TimeTicks& navigation_start, |
| int pending_nav_entry_id) { |
| - return std::unique_ptr<NavigationHandleImpl>( |
| - new NavigationHandleImpl(url, frame_tree_node, is_renderer_initiated, |
| - is_synchronous, is_srcdoc, navigation_start, |
| - pending_nav_entry_id)); |
| + return std::unique_ptr<NavigationHandleImpl>(new NavigationHandleImpl( |
| + url, frame_tree_node, is_renderer_initiated, is_same_page, is_srcdoc, |
| + navigation_start, pending_nav_entry_id)); |
| } |
| NavigationHandleImpl::NavigationHandleImpl( |
| const GURL& url, |
| FrameTreeNode* frame_tree_node, |
| bool is_renderer_initiated, |
| - bool is_synchronous, |
| + bool is_same_page, |
| bool is_srcdoc, |
| const base::TimeTicks& navigation_start, |
| int pending_nav_entry_id) |
| @@ -64,8 +63,7 @@ NavigationHandleImpl::NavigationHandleImpl( |
| net_error_code_(net::OK), |
| render_frame_host_(nullptr), |
| is_renderer_initiated_(is_renderer_initiated), |
| - is_same_page_(false), |
| - is_synchronous_(is_synchronous), |
| + is_same_page_(is_same_page), |
| is_srcdoc_(is_srcdoc), |
| was_redirected_(false), |
| state_(INITIAL), |
| @@ -128,10 +126,6 @@ bool NavigationHandleImpl::IsRendererInitiated() { |
| return is_renderer_initiated_; |
| } |
| -bool NavigationHandleImpl::IsSynchronousNavigation() { |
| - return is_synchronous_; |
| -} |
| - |
| bool NavigationHandleImpl::IsSrcdoc() { |
| return is_srcdoc_; |
| } |
| @@ -200,9 +194,6 @@ RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() { |
| } |
| bool NavigationHandleImpl::IsSamePage() { |
| - DCHECK(state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE) |
| - << "This accessor should not be called before the navigation has " |
| - "committed."; |
| return is_same_page_; |
| } |
| @@ -453,13 +444,13 @@ void NavigationHandleImpl::DidCommitNavigation( |
| RenderFrameHostImpl* render_frame_host) { |
| DCHECK(!render_frame_host_ || render_frame_host_ == render_frame_host); |
| DCHECK_EQ(frame_tree_node_, render_frame_host->frame_tree_node()); |
| + DCHECK_EQ(same_page, IsSamePage()); |
|
clamy
2016/09/19 11:09:50
It seems tests are hitting this DCHECK. I think th
nasko
2016/09/20 23:11:20
Actually, the reason was different - it was not re
|
| CHECK_EQ(url_, params.url); |
| method_ = params.method; |
| has_user_gesture_ = (params.gesture == NavigationGestureUser); |
| transition_ = params.transition; |
| render_frame_host_ = render_frame_host; |
| - is_same_page_ = same_page; |
| state_ = net_error_code_ == net::OK ? DID_COMMIT : DID_COMMIT_ERROR_PAGE; |
| } |