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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 const NavigationEntryImpl* entry) | 139 const NavigationEntryImpl* entry) |
140 : frame_tree_node_(frame_tree_node), | 140 : frame_tree_node_(frame_tree_node), |
141 common_params_(common_params), | 141 common_params_(common_params), |
142 begin_params_(begin_params), | 142 begin_params_(begin_params), |
143 request_params_(request_params), | 143 request_params_(request_params), |
144 browser_initiated_(browser_initiated), | 144 browser_initiated_(browser_initiated), |
145 state_(NOT_STARTED), | 145 state_(NOT_STARTED), |
146 restore_type_(NavigationEntryImpl::RESTORE_NONE), | 146 restore_type_(NavigationEntryImpl::RESTORE_NONE), |
147 is_view_source_(false), | 147 is_view_source_(false), |
148 bindings_(NavigationEntryImpl::kInvalidBindings) { | 148 bindings_(NavigationEntryImpl::kInvalidBindings) { |
149 DCHECK_IMPLIES(browser_initiated, entry != nullptr && frame_entry != nullptr); | 149 DCHECK(!browser_initiated || (entry != nullptr && frame_entry != nullptr)); |
150 if (browser_initiated) { | 150 if (browser_initiated) { |
151 // TODO(clamy): use the FrameNavigationEntry for the source SiteInstance | 151 // TODO(clamy): use the FrameNavigationEntry for the source SiteInstance |
152 // once it has been moved from the NavigationEntry. | 152 // once it has been moved from the NavigationEntry. |
153 source_site_instance_ = entry->source_site_instance(); | 153 source_site_instance_ = entry->source_site_instance(); |
154 dest_site_instance_ = frame_entry->site_instance(); | 154 dest_site_instance_ = frame_entry->site_instance(); |
155 restore_type_ = entry->restore_type(); | 155 restore_type_ = entry->restore_type(); |
156 is_view_source_ = entry->IsViewSourceMode(); | 156 is_view_source_ = entry->IsViewSourceMode(); |
157 bindings_ = entry->bindings(); | 157 bindings_ = entry->bindings(); |
158 } else { | 158 } else { |
159 // This is needed to have about:blank and data URLs commit in the same | 159 // This is needed to have about:blank and data URLs commit in the same |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 frame_tree_node_->navigator()->FailedNavigation( | 228 frame_tree_node_->navigator()->FailedNavigation( |
229 frame_tree_node_, has_stale_copy_in_cache, net_error); | 229 frame_tree_node_, has_stale_copy_in_cache, net_error); |
230 } | 230 } |
231 | 231 |
232 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { | 232 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { |
233 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, | 233 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, |
234 common_params_.url); | 234 common_params_.url); |
235 } | 235 } |
236 | 236 |
237 } // namespace content | 237 } // namespace content |
OLD | NEW |