OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_request.h" | 5 #include "content/browser/frame_host/navigation_request.h" |
6 | 6 |
7 #include "content/browser/frame_host/frame_tree.h" | 7 #include "content/browser/frame_host/frame_tree.h" |
8 #include "content/browser/frame_host/frame_tree_node.h" | 8 #include "content/browser/frame_host/frame_tree_node.h" |
9 #include "content/browser/frame_host/navigation_controller_impl.h" | 9 #include "content/browser/frame_host/navigation_controller_impl.h" |
10 #include "content/browser/frame_host/navigation_request_info.h" | 10 #include "content/browser/frame_host/navigation_request_info.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 scoped_refptr<ResourceRequestBody> body, | 103 scoped_refptr<ResourceRequestBody> body, |
104 int current_history_list_offset, | 104 int current_history_list_offset, |
105 int current_history_list_length) { | 105 int current_history_list_length) { |
106 // TODO(clamy): Check if some PageState should be provided here. | 106 // TODO(clamy): Check if some PageState should be provided here. |
107 // TODO(clamy): See how we should handle override of the user agent when the | 107 // TODO(clamy): See how we should handle override of the user agent when the |
108 // navigation may start in a renderer and commit in another one. | 108 // navigation may start in a renderer and commit in another one. |
109 // TODO(clamy): See if the navigation start time should be measured in the | 109 // TODO(clamy): See if the navigation start time should be measured in the |
110 // renderer and sent to the browser instead of being measured here. | 110 // renderer and sent to the browser instead of being measured here. |
111 scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest( | 111 scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest( |
112 frame_tree_node, common_params, begin_params, CommitNavigationParams(), | 112 frame_tree_node, common_params, begin_params, CommitNavigationParams(), |
113 HistoryNavigationParams(PageState(), -1, -1, current_history_list_offset, | 113 HistoryNavigationParams(PageState(), -1, 0, -1, |
| 114 current_history_list_offset, |
114 current_history_list_length, false), | 115 current_history_list_length, false), |
115 body, false, nullptr)); | 116 body, false, nullptr)); |
116 return navigation_request.Pass(); | 117 return navigation_request.Pass(); |
117 } | 118 } |
118 | 119 |
119 NavigationRequest::NavigationRequest( | 120 NavigationRequest::NavigationRequest( |
120 FrameTreeNode* frame_tree_node, | 121 FrameTreeNode* frame_tree_node, |
121 const CommonNavigationParams& common_params, | 122 const CommonNavigationParams& common_params, |
122 const BeginNavigationParams& begin_params, | 123 const BeginNavigationParams& begin_params, |
123 const CommitNavigationParams& commit_params, | 124 const CommitNavigationParams& commit_params, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // TODO(davidben): Network failures should display a network error page. | 208 // TODO(davidben): Network failures should display a network error page. |
208 NOTIMPLEMENTED() << " where net_error=" << net_error; | 209 NOTIMPLEMENTED() << " where net_error=" << net_error; |
209 } | 210 } |
210 | 211 |
211 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { | 212 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { |
212 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, | 213 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, |
213 common_params_.url); | 214 common_params_.url); |
214 } | 215 } |
215 | 216 |
216 } // namespace content | 217 } // namespace content |
OLD | NEW |