Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_impl.cc |
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
| index 36d8c661f11981a329d3a1dafb2d6132dd3b7db2..d14285c8e3b9e2f13c99d7227cbe76b35b01ef84 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.cc |
| +++ b/content/browser/frame_host/render_frame_host_impl.cc |
| @@ -1005,8 +1005,15 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) { |
| // commit as a new navigation. This can happen if an ongoing slow |
| // same-process navigation is interrupted by a synchronous renderer-initiated |
| // navigation. |
| + // TODO(csharrison): Data navigations with base URLs get reset here, because |
|
Charlie Reis
2016/02/19 18:00:11
Mention LoadDataWithBaseURL explicitly here.
Charlie Harrison
2016/02/22 14:50:42
Done.
|
| + // the NavigationHandle tracks the base URL but the validated_params.url track |
|
Charlie Reis
2016/02/19 18:00:11
nit: tracks the data
Charlie Harrison
2016/02/22 14:50:42
Done.
|
| + // the data. The trick of saving the old entry ids for these navigations |
| + // should go away when this is properly handled. |
|
Charlie Reis
2016/02/19 18:00:11
Let's add a bug number for this work, since it's g
Charlie Harrison
2016/02/22 14:50:42
Done.
|
| + int entry_id_for_data_nav = 0; |
| if (navigation_handle_ && |
| - navigation_handle_->GetURL() != validated_params.url) { |
| + (navigation_handle_->GetURL() != validated_params.url)) { |
| + if (navigation_handle_->GetURL() == validated_params.base_url) |
|
Charlie Reis
2016/02/19 18:00:11
This base_url gets used for other cases as well, a
|
| + entry_id_for_data_nav = navigation_handle_->pending_nav_entry_id(); |
| navigation_handle_.reset(); |
| } |
| @@ -1014,11 +1021,15 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) { |
| // DidCommitProvisionalLoad IPC without a prior DidStartProvisionalLoad |
| // message. |
| if (!navigation_handle_) { |
| + // There is no pending NavigationEntry in these cases, so pass 0 as the |
| + // nav_id. If the previous handle was a prematurely aborted data nav, then |
|
Charlie Reis
2016/02/19 18:00:11
Note: It's important to distinguish between a data
Charlie Harrison
2016/02/22 14:50:42
Fixed the wording.
|
| + // propagate the entry id. |
| navigation_handle_ = |
| NavigationHandleImpl::Create(validated_params.url, frame_tree_node_, |
| true, // is_synchronous |
| false, // is_srcdoc |
| - base::TimeTicks::Now()); |
| + base::TimeTicks::Now(), |
| + entry_id_for_data_nav); |
| } |
| accessibility_reset_count_ = 0; |