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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 // Use the SiteInstance of the navigating RenderFrameHost to get access to | 720 // Use the SiteInstance of the navigating RenderFrameHost to get access to |
721 // the StoragePartition. Using the url of the navigation will result in a | 721 // the StoragePartition. Using the url of the navigation will result in a |
722 // wrong StoragePartition being picked when a WebView is navigating. | 722 // wrong StoragePartition being picked when a WebView is navigating. |
723 DCHECK_NE(AssociatedSiteInstanceType::NONE, associated_site_instance_type_); | 723 DCHECK_NE(AssociatedSiteInstanceType::NONE, associated_site_instance_type_); |
724 RenderFrameHostImpl* navigating_frame_host = | 724 RenderFrameHostImpl* navigating_frame_host = |
725 associated_site_instance_type_ == AssociatedSiteInstanceType::SPECULATIVE | 725 associated_site_instance_type_ == AssociatedSiteInstanceType::SPECULATIVE |
726 ? frame_tree_node_->render_manager()->speculative_frame_host() | 726 ? frame_tree_node_->render_manager()->speculative_frame_host() |
727 : frame_tree_node_->current_frame_host(); | 727 : frame_tree_node_->current_frame_host(); |
728 DCHECK(navigating_frame_host); | 728 DCHECK(navigating_frame_host); |
729 | 729 |
| 730 navigation_handle_->SetSpeculativeProcess( |
| 731 navigating_frame_host->GetProcess()); |
| 732 |
730 BrowserContext* browser_context = | 733 BrowserContext* browser_context = |
731 frame_tree_node_->navigator()->GetController()->GetBrowserContext(); | 734 frame_tree_node_->navigator()->GetController()->GetBrowserContext(); |
732 StoragePartition* partition = BrowserContext::GetStoragePartition( | 735 StoragePartition* partition = BrowserContext::GetStoragePartition( |
733 browser_context, navigating_frame_host->GetSiteInstance()); | 736 browser_context, navigating_frame_host->GetSiteInstance()); |
734 DCHECK(partition); | 737 DCHECK(partition); |
735 | 738 |
736 // Only initialize the ServiceWorkerNavigationHandle if it can be created for | 739 // Only initialize the ServiceWorkerNavigationHandle if it can be created for |
737 // this frame. | 740 // this frame. |
738 bool can_create_service_worker = | 741 bool can_create_service_worker = |
739 (frame_tree_node_->pending_sandbox_flags() & | 742 (frame_tree_node_->pending_sandbox_flags() & |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); | 877 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); |
875 | 878 |
876 render_frame_host->CommitNavigation(response_.get(), std::move(body_), | 879 render_frame_host->CommitNavigation(response_.get(), std::move(body_), |
877 std::move(handle_), common_params_, | 880 std::move(handle_), common_params_, |
878 request_params_, is_view_source_); | 881 request_params_, is_view_source_); |
879 | 882 |
880 frame_tree_node_->ResetNavigationRequest(true, true); | 883 frame_tree_node_->ResetNavigationRequest(true, true); |
881 } | 884 } |
882 | 885 |
883 } // namespace content | 886 } // namespace content |
OLD | NEW |