Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/navigation_handle_impl.h" | 5 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 6 | 6 |
| 7 #include <iterator> | 7 #include <iterator> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 737 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, | 737 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, |
| 738 bool navigation_entry_committed, | 738 bool navigation_entry_committed, |
| 739 bool did_replace_entry, | 739 bool did_replace_entry, |
| 740 const GURL& previous_url, | 740 const GURL& previous_url, |
| 741 NavigationType navigation_type, | 741 NavigationType navigation_type, |
| 742 RenderFrameHostImpl* render_frame_host) { | 742 RenderFrameHostImpl* render_frame_host) { |
| 743 DCHECK(!render_frame_host_ || render_frame_host_ == render_frame_host); | 743 DCHECK(!render_frame_host_ || render_frame_host_ == render_frame_host); |
| 744 DCHECK_EQ(frame_tree_node_, render_frame_host->frame_tree_node()); | 744 DCHECK_EQ(frame_tree_node_, render_frame_host->frame_tree_node()); |
| 745 CHECK_EQ(url_, params.url); | 745 CHECK_EQ(url_, params.url); |
| 746 | 746 |
| 747 // Will crash when the transition was FORWARD_BACK and becomes something else | |
| 748 // for mysterious reasons. | |
| 749 CHECK(!(transition_ & ui::PAGE_TRANSITION_FORWARD_BACK) || | |
| 750 params.transition & ui::PAGE_TRANSITION_FORWARD_BACK); | |
|
Charlie Reis
2017/06/27 03:59:29
Are you worried at all about the other direction?
| |
| 751 | |
| 747 did_replace_entry_ = did_replace_entry; | 752 did_replace_entry_ = did_replace_entry; |
| 748 method_ = params.method; | 753 method_ = params.method; |
| 749 has_user_gesture_ = (params.gesture == NavigationGestureUser); | 754 has_user_gesture_ = (params.gesture == NavigationGestureUser); |
| 750 transition_ = params.transition; | 755 transition_ = params.transition; |
| 751 should_update_history_ = params.should_update_history; | 756 should_update_history_ = params.should_update_history; |
| 752 render_frame_host_ = render_frame_host; | 757 render_frame_host_ = render_frame_host; |
| 753 previous_url_ = previous_url; | 758 previous_url_ = previous_url; |
| 754 base_url_ = params.base_url; | 759 base_url_ = params.base_url; |
| 755 socket_address_ = params.socket_address; | 760 socket_address_ = params.socket_address; |
| 756 navigation_type_ = navigation_type; | 761 navigation_type_ = navigation_type; |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1160 if (new_site_url == site_url_) | 1165 if (new_site_url == site_url_) |
| 1161 return; | 1166 return; |
| 1162 | 1167 |
| 1163 // When redirecting cross-site, stop telling the speculative | 1168 // When redirecting cross-site, stop telling the speculative |
| 1164 // RenderProcessHost to expect a navigation commit. | 1169 // RenderProcessHost to expect a navigation commit. |
| 1165 SetExpectedProcess(nullptr); | 1170 SetExpectedProcess(nullptr); |
| 1166 site_url_ = new_site_url; | 1171 site_url_ = new_site_url; |
| 1167 } | 1172 } |
| 1168 | 1173 |
| 1169 } // namespace content | 1174 } // namespace content |
| OLD | NEW |