Chromium Code Reviews| Index: content/browser/frame_host/navigation_request.cc |
| diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc |
| index 5bc27d4fc9f16b76321cd95e788985122a94b283..ddef9e57ad6a890865ba681a0a6987a38deb60f7 100644 |
| --- a/content/browser/frame_host/navigation_request.cc |
| +++ b/content/browser/frame_host/navigation_request.cc |
| @@ -5,9 +5,11 @@ |
| #include "content/browser/frame_host/navigation_request.h" |
| #include "content/browser/frame_host/frame_tree_node.h" |
| +#include "content/browser/frame_host/navigation_entry_impl.h" |
| #include "content/browser/frame_host/navigation_request_info.h" |
| #include "content/browser/frame_host/navigator.h" |
| #include "content/browser/loader/navigation_url_loader.h" |
| +#include "content/browser/site_instance_impl.h" |
| #include "content/common/resource_request_body.h" |
| #include "content/public/browser/navigation_controller.h" |
| #include "content/public/browser/stream_handle.h" |
| @@ -22,7 +24,10 @@ NavigationRequest::NavigationRequest( |
| : frame_tree_node_(frame_tree_node), |
| common_params_(common_params), |
| commit_params_(commit_params), |
| - state_(NOT_STARTED) { |
| + state_(NOT_STARTED), |
| + is_restore_(false), |
| + is_view_source_(false), |
| + bindings_(NavigationEntryImpl::kInvalidBindings) { |
| } |
| NavigationRequest::~NavigationRequest() { |
| @@ -43,6 +48,14 @@ void NavigationRequest::BeginNavigation( |
| // DidStartProvisionalLoadForFrame for the navigation. |
| } |
| +void NavigationRequest::CopyDataFrom(const NavigationEntryImpl& nav_entry) { |
| + source_site_instance_ = nav_entry.source_site_instance(); |
| + dest_site_instance_ = nav_entry.site_instance(); |
| + is_restore_ = nav_entry.restore_type() != NavigationEntryImpl::RESTORE_NONE; |
|
nasko
2015/01/16 15:03:24
Why not store the restore type directly?
carlosk
2015/01/19 15:02:52
The reason was that we only need to know if it is
|
| + is_view_source_ = nav_entry.IsViewSourceMode(); |
| + bindings_ = nav_entry.bindings(); |
| +} |
| + |
| void NavigationRequest::OnRequestRedirected( |
| const net::RedirectInfo& redirect_info, |
| const scoped_refptr<ResourceResponse>& response) { |