Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_manager.cc |
| diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc |
| index 06ab825123e4b1fd294dd577e6aee18ab9ff94fe..e9f9c151b85b5620cabfc02ecb4341a6f91f25d6 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager.cc |
| +++ b/content/browser/frame_host/render_frame_host_manager.cc |
| @@ -418,7 +418,8 @@ void RenderFrameHostManager::ClearNavigationTransitionData() { |
| } |
| void RenderFrameHostManager::DidNavigateFrame( |
| - RenderFrameHostImpl* render_frame_host) { |
| + RenderFrameHostImpl* render_frame_host, |
| + bool was_caused_by_user_gesture) { |
| if (!cross_navigation_pending_) { |
| DCHECK(!pending_render_frame_host_); |
| @@ -435,14 +436,15 @@ void RenderFrameHostManager::DidNavigateFrame( |
| // The pending cross-site navigation completed, so show the renderer. |
| CommitPending(); |
| cross_navigation_pending_ = false; |
| - } else if (render_frame_host == render_frame_host_) { |
| + } else if (render_frame_host == render_frame_host_ && |
| + was_caused_by_user_gesture) { |
| // A navigation in the original page has taken place. Cancel the pending |
| // one. |
|
Charlie Reis
2014/12/03 21:32:19
Let's update this comment: "Cancel the pending one
|
| CancelPending(); |
| cross_navigation_pending_ = false; |
| } else { |
| // No one else should be sending us DidNavigate in this state. |
| - DCHECK(false); |
| + DCHECK(!was_caused_by_user_gesture); |
|
Charlie Reis
2014/12/03 21:32:19
This is confusing, since the DCHECK and comment ar
|
| } |
| } |