| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |