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

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

Issue 281653003: DRAFT CL: Add FrameNavigationEntry and track subframe session histories. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 5 years, 9 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 | Annotate | Revision Log
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Fill POST data from the browser in the request body. 78 // Fill POST data from the browser in the request body.
79 scoped_refptr<ResourceRequestBody> request_body; 79 scoped_refptr<ResourceRequestBody> request_body;
80 if (entry.GetHasPostData()) { 80 if (entry.GetHasPostData()) {
81 request_body = new ResourceRequestBody(); 81 request_body = new ResourceRequestBody();
82 request_body->AppendBytes( 82 request_body->AppendBytes(
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 FrameNavigationEntry* frame_entry = entry.root_node()->frame_entry.get();
88 scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest( 89 scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest(
89 frame_tree_node, entry.ConstructCommonNavigationParams(navigation_type), 90 frame_tree_node,
91 entry.ConstructCommonNavigationParams(*frame_entry, navigation_type),
90 BeginNavigationParams(method, headers.ToString(), 92 BeginNavigationParams(method, headers.ToString(),
91 LoadFlagFromNavigationType(navigation_type), false), 93 LoadFlagFromNavigationType(navigation_type), false),
92 entry.ConstructCommitNavigationParams(navigation_start), 94 entry.ConstructCommitNavigationParams(navigation_start),
93 entry.ConstructHistoryNavigationParams(controller), request_body, true, 95 entry.ConstructHistoryNavigationParams(*frame_entry, controller),
94 &entry)); 96 request_body, true, &entry));
95 return navigation_request.Pass(); 97 return navigation_request.Pass();
96 } 98 }
97 99
98 // static 100 // static
99 scoped_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated( 101 scoped_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated(
100 FrameTreeNode* frame_tree_node, 102 FrameTreeNode* frame_tree_node,
101 const CommonNavigationParams& common_params, 103 const CommonNavigationParams& common_params,
102 const BeginNavigationParams& begin_params, 104 const BeginNavigationParams& begin_params,
103 scoped_refptr<ResourceRequestBody> body, 105 scoped_refptr<ResourceRequestBody> body,
104 int current_history_list_offset, 106 int current_history_list_offset,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // TODO(davidben): Network failures should display a network error page. 209 // TODO(davidben): Network failures should display a network error page.
208 NOTIMPLEMENTED() << " where net_error=" << net_error; 210 NOTIMPLEMENTED() << " where net_error=" << net_error;
209 } 211 }
210 212
211 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { 213 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) {
212 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, 214 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp,
213 common_params_.url); 215 common_params_.url);
214 } 216 }
215 217
216 } // namespace content 218 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.cc ('k') | content/browser/frame_host/navigator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698