Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: content/browser/frame_host/navigation_request.cc

Issue 1157373002: Revert of Fix the commit type for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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->HasCommittedRealLoad(frame_tree_node), 93 navigation_start,
94 controller->GetPendingEntryIndex() == -1, 94 controller->GetPendingEntryIndex() == -1,
95 controller->GetIndexOfEntry(&entry), 95 controller->GetIndexOfEntry(&entry),
96 controller->GetLastCommittedEntryIndex(), 96 controller->GetLastCommittedEntryIndex(),
97 controller->GetEntryCount()), 97 controller->GetEntryCount()),
98 request_body, true, &entry)); 98 request_body, true, &entry));
99 return navigation_request.Pass(); 99 return navigation_request.Pass();
100 } 100 }
101 101
102 // static 102 // static
103 scoped_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated( 103 scoped_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated(
104 FrameTreeNode* frame_tree_node, 104 FrameTreeNode* frame_tree_node,
105 const CommonNavigationParams& common_params, 105 const CommonNavigationParams& common_params,
106 const BeginNavigationParams& begin_params, 106 const BeginNavigationParams& begin_params,
107 scoped_refptr<ResourceRequestBody> body, 107 scoped_refptr<ResourceRequestBody> body,
108 int current_history_list_offset, 108 int current_history_list_offset,
109 int current_history_list_length) { 109 int current_history_list_length) {
110 // TODO(clamy): Check if some PageState should be provided here. 110 // TODO(clamy): Check if some PageState should be provided here.
111 // TODO(clamy): See how we should handle override of the user agent when the 111 // TODO(clamy): See how we should handle override of the user agent when the
112 // navigation may start in a renderer and commit in another one. 112 // navigation may start in a renderer and commit in another one.
113 // TODO(clamy): See if the navigation start time should be measured in the 113 // TODO(clamy): See if the navigation start time should be measured in the
114 // renderer and sent to the browser instead of being measured here. 114 // renderer and sent to the browser instead of being measured here.
115 // TODO(clamy): The pending history list offset should be properly set. 115 // TODO(clamy): The pending history list offset should be properly set.
116 // TODO(clamy): Set has_committed_real_load.
117 RequestNavigationParams request_params; 116 RequestNavigationParams request_params;
118 request_params.current_history_list_offset = current_history_list_offset; 117 request_params.current_history_list_offset = current_history_list_offset;
119 request_params.current_history_list_length = current_history_list_length; 118 request_params.current_history_list_length = current_history_list_length;
120 scoped_ptr<NavigationRequest> navigation_request( 119 scoped_ptr<NavigationRequest> navigation_request(
121 new NavigationRequest(frame_tree_node, common_params, begin_params, 120 new NavigationRequest(frame_tree_node, common_params, begin_params,
122 request_params, body, false, nullptr)); 121 request_params, body, false, nullptr));
123 return navigation_request.Pass(); 122 return navigation_request.Pass();
124 } 123 }
125 124
126 NavigationRequest::NavigationRequest( 125 NavigationRequest::NavigationRequest(
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 frame_tree_node_->navigator()->FailedNavigation( 213 frame_tree_node_->navigator()->FailedNavigation(
215 frame_tree_node_, has_stale_copy_in_cache, net_error); 214 frame_tree_node_, has_stale_copy_in_cache, net_error);
216 } 215 }
217 216
218 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { 217 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) {
219 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, 218 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp,
220 common_params_.url); 219 common_params_.url);
221 } 220 }
222 221
223 } // namespace content 222 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.cc ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698