| 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_handle_impl.h" | 10 #include "content/browser/frame_host/navigation_handle_impl.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 const NavigationEntryImpl* entry) | 151 const NavigationEntryImpl* entry) |
| 152 : frame_tree_node_(frame_tree_node), | 152 : frame_tree_node_(frame_tree_node), |
| 153 common_params_(common_params), | 153 common_params_(common_params), |
| 154 begin_params_(begin_params), | 154 begin_params_(begin_params), |
| 155 request_params_(request_params), | 155 request_params_(request_params), |
| 156 browser_initiated_(browser_initiated), | 156 browser_initiated_(browser_initiated), |
| 157 state_(NOT_STARTED), | 157 state_(NOT_STARTED), |
| 158 restore_type_(NavigationEntryImpl::RESTORE_NONE), | 158 restore_type_(NavigationEntryImpl::RESTORE_NONE), |
| 159 is_view_source_(false), | 159 is_view_source_(false), |
| 160 bindings_(NavigationEntryImpl::kInvalidBindings) { | 160 bindings_(NavigationEntryImpl::kInvalidBindings) { |
| 161 DCHECK_IMPLIES(browser_initiated, entry != nullptr && frame_entry != nullptr); | 161 DCHECK(!browser_initiated || (entry != nullptr && frame_entry != nullptr)); |
| 162 if (browser_initiated) { | 162 if (browser_initiated) { |
| 163 // TODO(clamy): use the FrameNavigationEntry for the source SiteInstance | 163 // TODO(clamy): use the FrameNavigationEntry for the source SiteInstance |
| 164 // once it has been moved from the NavigationEntry. | 164 // once it has been moved from the NavigationEntry. |
| 165 source_site_instance_ = entry->source_site_instance(); | 165 source_site_instance_ = entry->source_site_instance(); |
| 166 dest_site_instance_ = frame_entry->site_instance(); | 166 dest_site_instance_ = frame_entry->site_instance(); |
| 167 restore_type_ = entry->restore_type(); | 167 restore_type_ = entry->restore_type(); |
| 168 is_view_source_ = entry->IsViewSourceMode(); | 168 is_view_source_ = entry->IsViewSourceMode(); |
| 169 bindings_ = entry->bindings(); | 169 bindings_ = entry->bindings(); |
| 170 } else { | 170 } else { |
| 171 // This is needed to have about:blank and data URLs commit in the same | 171 // This is needed to have about:blank and data URLs commit in the same |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { | 293 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { |
| 294 frame_tree_node_->ResetNavigationRequest(false); | 294 frame_tree_node_->ResetNavigationRequest(false); |
| 295 return; | 295 return; |
| 296 } | 296 } |
| 297 | 297 |
| 298 loader_->FollowRedirect(); | 298 loader_->FollowRedirect(); |
| 299 navigation_handle_->DidRedirectNavigation(common_params_.url); | 299 navigation_handle_->DidRedirectNavigation(common_params_.url); |
| 300 } | 300 } |
| 301 | 301 |
| 302 } // namespace content | 302 } // namespace content |
| OLD | NEW |