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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 reinterpret_cast<const char *>( | 83 reinterpret_cast<const char *>( |
84 entry.GetBrowserInitiatedPostData()->front()), | 84 entry.GetBrowserInitiatedPostData()->front()), |
85 entry.GetBrowserInitiatedPostData()->size()); | 85 entry.GetBrowserInitiatedPostData()->size()); |
86 } | 86 } |
87 | 87 |
88 scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest( | 88 scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest( |
89 frame_tree_node, entry.ConstructCommonNavigationParams(navigation_type), | 89 frame_tree_node, entry.ConstructCommonNavigationParams(navigation_type), |
90 BeginNavigationParams(method, headers.ToString(), | 90 BeginNavigationParams(method, headers.ToString(), |
91 LoadFlagFromNavigationType(navigation_type), false), | 91 LoadFlagFromNavigationType(navigation_type), false), |
92 entry.ConstructRequestNavigationParams( | 92 entry.ConstructRequestNavigationParams( |
93 navigation_start, controller->GetIndexOfEntry(&entry), | 93 navigation_start, |
| 94 controller->GetPendingEntryIndex() == -1, |
| 95 controller->GetIndexOfEntry(&entry), |
94 controller->GetLastCommittedEntryIndex(), | 96 controller->GetLastCommittedEntryIndex(), |
95 controller->GetEntryCount()), | 97 controller->GetEntryCount()), |
96 request_body, true, &entry)); | 98 request_body, true, &entry)); |
97 return navigation_request.Pass(); | 99 return navigation_request.Pass(); |
98 } | 100 } |
99 | 101 |
100 // static | 102 // static |
101 scoped_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated( | 103 scoped_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated( |
102 FrameTreeNode* frame_tree_node, | 104 FrameTreeNode* frame_tree_node, |
103 const CommonNavigationParams& common_params, | 105 const CommonNavigationParams& common_params, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 frame_tree_node_->navigator()->FailedNavigation( | 212 frame_tree_node_->navigator()->FailedNavigation( |
211 frame_tree_node_, has_stale_copy_in_cache, net_error); | 213 frame_tree_node_, has_stale_copy_in_cache, net_error); |
212 } | 214 } |
213 | 215 |
214 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { | 216 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { |
215 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, | 217 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, |
216 common_params_.url); | 218 common_params_.url); |
217 } | 219 } |
218 | 220 |
219 } // namespace content | 221 } // namespace content |
OLD | NEW |