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 30536bd306c76c4da490f9ea142210612c907d0c..44547e2d710872c02b28a3776ec47843c9e9487f 100644 |
| --- a/content/browser/frame_host/navigation_handle_impl.cc |
| +++ b/content/browser/frame_host/navigation_handle_impl.cc |
| @@ -16,6 +16,8 @@ |
| #include "content/browser/frame_host/ancestor_throttle.h" |
| #include "content/browser/frame_host/debug_urls.h" |
| #include "content/browser/frame_host/frame_tree_node.h" |
| +#include "content/browser/frame_host/navigation_controller_impl.h" |
| +#include "content/browser/frame_host/navigation_entry_impl.h" |
| #include "content/browser/frame_host/navigator.h" |
| #include "content/browser/frame_host/navigator_delegate.h" |
| #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| @@ -100,6 +102,7 @@ NavigationHandleImpl::NavigationHandleImpl( |
| is_download_(false), |
| is_stream_(false), |
| started_from_context_menu_(started_from_context_menu), |
| + reload_type_(ReloadType::NONE), |
| weak_factory_(this) { |
| DCHECK(!navigation_start.is_null()); |
| redirect_chain_.push_back(url); |
| @@ -107,6 +110,23 @@ NavigationHandleImpl::NavigationHandleImpl( |
| starting_site_instance_ = |
| frame_tree_node_->current_frame_host()->GetSiteInstance(); |
| + if (pending_nav_entry_id_) { |
| + NavigationControllerImpl* nav_controller = |
|
Charlie Reis
2017/01/23 18:30:08
Hmm. This looks like it will be correct if we fin
jam
2017/01/23 19:03:39
I did find a NavEntry for renderer-initiated reloa
Charlie Reis
2017/01/23 19:53:30
Ah, that's from NavigatorImpl::DidStartMainFrameNa
|
| + static_cast<NavigationControllerImpl*>( |
| + frame_tree_node_->navigator()->GetController()); |
| + NavigationEntryImpl* nav_entry = |
| + nav_controller->GetEntryWithUniqueID(pending_nav_entry_id_); |
| + if (!nav_entry && |
| + nav_controller->GetPendingEntry() && |
| + nav_controller->GetPendingEntry()->GetUniqueID() == |
| + pending_nav_entry_id_) { |
| + nav_entry = nav_controller->GetPendingEntry(); |
| + } |
| + |
| + if (nav_entry) |
| + reload_type_ = nav_entry->reload_type(); |
| + } |
| + |
| if (!IsRendererDebugURL(url_)) |
| GetDelegate()->DidStartNavigation(this); |
| @@ -396,6 +416,10 @@ const std::string& NavigationHandleImpl::GetSearchableFormEncoding() { |
| return searchable_form_encoding_; |
| } |
| +ReloadType NavigationHandleImpl::GetReloadType() { |
| + return reload_type_; |
| +} |
| + |
| NavigationData* NavigationHandleImpl::GetNavigationData() { |
| return navigation_data_.get(); |
| } |