| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "content/browser/appcache/appcache_navigation_handle.h" | 10 #include "content/browser/appcache/appcache_navigation_handle.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 frame_entry, request_body, dest_url, dest_referrer, navigation_type, | 210 frame_entry, request_body, dest_url, dest_referrer, navigation_type, |
| 211 previews_state, navigation_start); | 211 previews_state, navigation_start); |
| 212 | 212 |
| 213 std::unique_ptr<NavigationRequest> navigation_request(new NavigationRequest( | 213 std::unique_ptr<NavigationRequest> navigation_request(new NavigationRequest( |
| 214 frame_tree_node, common_params, | 214 frame_tree_node, common_params, |
| 215 BeginNavigationParams(entry.extra_headers(), net::LOAD_NORMAL, | 215 BeginNavigationParams(entry.extra_headers(), net::LOAD_NORMAL, |
| 216 false, // has_user_gestures | 216 false, // has_user_gestures |
| 217 false, // skip_service_worker | 217 false, // skip_service_worker |
| 218 REQUEST_CONTEXT_TYPE_LOCATION, | 218 REQUEST_CONTEXT_TYPE_LOCATION, |
| 219 blink::WebMixedContentContextType::Blockable, | 219 blink::WebMixedContentContextType::Blockable, |
| 220 false, // is_form_submission |
| 220 initiator), | 221 initiator), |
| 221 entry.ConstructRequestNavigationParams( | 222 entry.ConstructRequestNavigationParams( |
| 222 frame_entry, common_params.url, common_params.method, | 223 frame_entry, common_params.url, common_params.method, |
| 223 is_history_navigation_in_new_child, | 224 is_history_navigation_in_new_child, |
| 224 entry.GetSubframeUniqueNames(frame_tree_node), | 225 entry.GetSubframeUniqueNames(frame_tree_node), |
| 225 frame_tree_node->has_committed_real_load(), | 226 frame_tree_node->has_committed_real_load(), |
| 226 controller->GetPendingEntryIndex() == -1, | 227 controller->GetPendingEntryIndex() == -1, |
| 227 controller->GetIndexOfEntry(&entry), | 228 controller->GetIndexOfEntry(&entry), |
| 228 controller->GetLastCommittedEntryIndex(), | 229 controller->GetLastCommittedEntryIndex(), |
| 229 controller->GetEntryCount()), | 230 controller->GetEntryCount()), |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 redirect_chain.push_back(begin_params_.client_side_redirect_url); | 388 redirect_chain.push_back(begin_params_.client_side_redirect_url); |
| 388 redirect_chain.push_back(common_params_.url); | 389 redirect_chain.push_back(common_params_.url); |
| 389 | 390 |
| 390 std::unique_ptr<NavigationHandleImpl> navigation_handle = | 391 std::unique_ptr<NavigationHandleImpl> navigation_handle = |
| 391 NavigationHandleImpl::Create( | 392 NavigationHandleImpl::Create( |
| 392 common_params_.url, redirect_chain, frame_tree_node_, | 393 common_params_.url, redirect_chain, frame_tree_node_, |
| 393 !browser_initiated_, FrameMsg_Navigate_Type::IsSameDocument( | 394 !browser_initiated_, FrameMsg_Navigate_Type::IsSameDocument( |
| 394 common_params_.navigation_type), | 395 common_params_.navigation_type), |
| 395 common_params_.navigation_start, pending_nav_entry_id, | 396 common_params_.navigation_start, pending_nav_entry_id, |
| 396 false, // started_in_context_menu | 397 false, // started_in_context_menu |
| 397 common_params_.should_bypass_main_world_csp); | 398 common_params_.should_bypass_main_world_csp, |
| 399 begin_params_.is_form_submission); |
| 398 | 400 |
| 399 if (!frame_tree_node->navigation_request()) { | 401 if (!frame_tree_node->navigation_request()) { |
| 400 // A callback could have cancelled this request synchronously in which case | 402 // A callback could have cancelled this request synchronously in which case |
| 401 // |this| is deleted. | 403 // |this| is deleted. |
| 402 return; | 404 return; |
| 403 } | 405 } |
| 404 | 406 |
| 405 navigation_handle_ = std::move(navigation_handle); | 407 navigation_handle_ = std::move(navigation_handle); |
| 406 | 408 |
| 407 if (!begin_params_.searchable_form_url.is_empty()) { | 409 if (!begin_params_.searchable_form_url.is_empty()) { |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); | 747 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); |
| 746 | 748 |
| 747 render_frame_host->CommitNavigation(response_.get(), std::move(body_), | 749 render_frame_host->CommitNavigation(response_.get(), std::move(body_), |
| 748 common_params_, request_params_, | 750 common_params_, request_params_, |
| 749 is_view_source_); | 751 is_view_source_); |
| 750 | 752 |
| 751 frame_tree_node_->ResetNavigationRequest(true); | 753 frame_tree_node_->ResetNavigationRequest(true); |
| 752 } | 754 } |
| 753 | 755 |
| 754 } // namespace content | 756 } // namespace content |
| OLD | NEW |