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 e0c1215bbe6bbcf38e39c25301bece63901d8876..3f0471984557749dccc6f7aec9c9558a5f771e74 100644 |
| --- a/content/browser/frame_host/navigation_request.cc |
| +++ b/content/browser/frame_host/navigation_request.cc |
| @@ -5,6 +5,7 @@ |
| #include "content/browser/frame_host/navigation_request.h" |
| #include "base/logging.h" |
| +#include "content/browser/frame_host/navigation_request_info.h" |
| #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| #include "content/common/resource_request_body.h" |
| #include "content/public/browser/browser_thread.h" |
| @@ -16,13 +17,18 @@ namespace { |
| // The next available browser-global navigation request ID. |
| static int64 next_navigation_request_id_ = 0; |
| -void OnBeginNavigation(const NavigationRequestInfo& info, |
| +void OnBeginNavigation(const CoreNavigationParams& core_params, |
| + const NavigationRequestInfo& info, |
| scoped_refptr<ResourceRequestBody> request_body, |
| int64 navigation_request_id, |
| int64 frame_tree_node_id) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| ResourceDispatcherHostImpl::Get()->StartNavigationRequest( |
| - info, request_body, navigation_request_id, frame_tree_node_id); |
| + core_params, |
| + info, |
| + request_body, |
| + navigation_request_id, |
| + frame_tree_node_id); |
| } |
| void CancelNavigationRequest(int64 navigation_request_id, |
| @@ -34,24 +40,30 @@ void CancelNavigationRequest(int64 navigation_request_id, |
| } // namespace |
| -NavigationRequest::NavigationRequest(const NavigationRequestInfo& info, |
| - int64 frame_tree_node_id) |
| - : navigation_request_id_(++next_navigation_request_id_), |
| - info_(info), |
| - frame_tree_node_id_(frame_tree_node_id) { |
| +NavigationRequest::NavigationRequest( |
| + int64 frame_tree_node_id, |
| + const CoreNavigationParams& core_params, |
| + const CommitNavigationParams& commit_params) |
| + : navigation_request_id_(++next_navigation_request_id_), |
| + frame_tree_node_id_(frame_tree_node_id), |
| + core_params_(core_params), |
| + commit_params_(commit_params) { |
| } |
| NavigationRequest::~NavigationRequest() { |
| } |
| void NavigationRequest::BeginNavigation( |
| + scoped_ptr<NavigationRequestInfo> info, |
| scoped_refptr<ResourceRequestBody> request_body) { |
| + info_ = info.Pass(); |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| BrowserThread::PostTask( |
| BrowserThread::IO, |
| FROM_HERE, |
| base::Bind(&OnBeginNavigation, |
| - info_, |
| + core_params_, |
| + *info_, |
|
nasko
2014/09/26 22:16:43
Are we sure that this NavigationRequest will outli
clamy
2014/09/29 20:45:30
We are making a copy of info and passing it to the
nasko
2014/09/29 22:12:11
Should it be prefixed/suffixed with test marker th
clamy
2014/09/29 23:12:11
I have renamed the getter info_for_test(), which s
|
| request_body, |
| navigation_request_id_, |
| frame_tree_node_id_)); |