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

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

Issue 1079163008: PlzNavigate: provide the FrameTreeNode ID to the network stack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-unittests
Patch Set: Rebase + addressed Nasko's comments 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 bindings_ = entry->bindings(); 147 bindings_ = entry->bindings();
148 } 148 }
149 149
150 const GURL& first_party_for_cookies = 150 const GURL& first_party_for_cookies =
151 frame_tree_node->IsMainFrame() 151 frame_tree_node->IsMainFrame()
152 ? common_params.url 152 ? common_params.url
153 : frame_tree_node->frame_tree()->root()->current_url(); 153 : frame_tree_node->frame_tree()->root()->current_url();
154 bool parent_is_main_frame = !frame_tree_node->parent() ? 154 bool parent_is_main_frame = !frame_tree_node->parent() ?
155 false : frame_tree_node->parent()->IsMainFrame(); 155 false : frame_tree_node->parent()->IsMainFrame();
156 info_.reset(new NavigationRequestInfo( 156 info_.reset(new NavigationRequestInfo(
157 common_params, begin_params, first_party_for_cookies, 157 common_params, begin_params, first_party_for_cookies,
158 frame_tree_node->IsMainFrame(), parent_is_main_frame, body)); 158 frame_tree_node->IsMainFrame(), parent_is_main_frame,
159 frame_tree_node->frame_tree_node_id(), body));
159 } 160 }
160 161
161 NavigationRequest::~NavigationRequest() { 162 NavigationRequest::~NavigationRequest() {
162 } 163 }
163 164
164 bool NavigationRequest::BeginNavigation() { 165 bool NavigationRequest::BeginNavigation() {
165 DCHECK(!loader_); 166 DCHECK(!loader_);
166 DCHECK(state_ == NOT_STARTED || state_ == WAITING_FOR_RENDERER_RESPONSE); 167 DCHECK(state_ == NOT_STARTED || state_ == WAITING_FOR_RENDERER_RESPONSE);
167 state_ = STARTED; 168 state_ = STARTED;
168 169
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 frame_tree_node_->navigator()->FailedNavigation( 213 frame_tree_node_->navigator()->FailedNavigation(
213 frame_tree_node_, has_stale_copy_in_cache, net_error); 214 frame_tree_node_, has_stale_copy_in_cache, net_error);
214 } 215 }
215 216
216 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { 217 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) {
217 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, 218 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp,
218 common_params_.url); 219 common_params_.url);
219 } 220 }
220 221
221 } // namespace content 222 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_resource_handler.cc ('k') | content/browser/frame_host/navigation_request_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698