| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 bindings_ = entry->bindings(); | 145 bindings_ = entry->bindings(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 const GURL& first_party_for_cookies = | 148 const GURL& first_party_for_cookies = |
| 149 frame_tree_node->IsMainFrame() | 149 frame_tree_node->IsMainFrame() |
| 150 ? common_params.url | 150 ? common_params.url |
| 151 : frame_tree_node->frame_tree()->root()->current_url(); | 151 : frame_tree_node->frame_tree()->root()->current_url(); |
| 152 bool parent_is_main_frame = !frame_tree_node->parent() ? | 152 bool parent_is_main_frame = !frame_tree_node->parent() ? |
| 153 false : frame_tree_node->parent()->IsMainFrame(); | 153 false : frame_tree_node->parent()->IsMainFrame(); |
| 154 info_.reset(new NavigationRequestInfo( | 154 info_.reset(new NavigationRequestInfo( |
| 155 common_params, begin_params, first_party_for_cookies, | 155 common_params, begin_params, first_party_for_cookies, |
| 156 frame_tree_node->IsMainFrame(), parent_is_main_frame, body)); | 156 frame_tree_node->IsMainFrame(), parent_is_main_frame, |
| 157 frame_tree_node->frame_tree_node_id(), body)); |
| 157 } | 158 } |
| 158 | 159 |
| 159 NavigationRequest::~NavigationRequest() { | 160 NavigationRequest::~NavigationRequest() { |
| 160 } | 161 } |
| 161 | 162 |
| 162 bool NavigationRequest::BeginNavigation() { | 163 bool NavigationRequest::BeginNavigation() { |
| 163 DCHECK(!loader_); | 164 DCHECK(!loader_); |
| 164 DCHECK(state_ == NOT_STARTED || state_ == WAITING_FOR_RENDERER_RESPONSE); | 165 DCHECK(state_ == NOT_STARTED || state_ == WAITING_FOR_RENDERER_RESPONSE); |
| 165 state_ = STARTED; | 166 state_ = STARTED; |
| 166 | 167 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 frame_tree_node_->navigator()->FailedNavigation( | 211 frame_tree_node_->navigator()->FailedNavigation( |
| 211 frame_tree_node_, has_stale_copy_in_cache, net_error); | 212 frame_tree_node_, has_stale_copy_in_cache, net_error); |
| 212 } | 213 } |
| 213 | 214 |
| 214 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { | 215 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { |
| 215 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, | 216 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, |
| 216 common_params_.url); | 217 common_params_.url); |
| 217 } | 218 } |
| 218 | 219 |
| 219 } // namespace content | 220 } // namespace content |
| OLD | NEW |