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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
708 // Use the SiteInstance of the navigating RenderFrameHost to get access to | 708 // Use the SiteInstance of the navigating RenderFrameHost to get access to |
709 // the StoragePartition. Using the url of the navigation will result in a | 709 // the StoragePartition. Using the url of the navigation will result in a |
710 // wrong StoragePartition being picked when a WebView is navigating. | 710 // wrong StoragePartition being picked when a WebView is navigating. |
711 DCHECK_NE(AssociatedSiteInstanceType::NONE, associated_site_instance_type_); | 711 DCHECK_NE(AssociatedSiteInstanceType::NONE, associated_site_instance_type_); |
712 RenderFrameHostImpl* navigating_frame_host = | 712 RenderFrameHostImpl* navigating_frame_host = |
713 associated_site_instance_type_ == AssociatedSiteInstanceType::SPECULATIVE | 713 associated_site_instance_type_ == AssociatedSiteInstanceType::SPECULATIVE |
714 ? frame_tree_node_->render_manager()->speculative_frame_host() | 714 ? frame_tree_node_->render_manager()->speculative_frame_host() |
715 : frame_tree_node_->current_frame_host(); | 715 : frame_tree_node_->current_frame_host(); |
716 DCHECK(navigating_frame_host); | 716 DCHECK(navigating_frame_host); |
717 | 717 |
718 // Inform the NavigationHandle of the RenderProcessHost ID of the | |
719 // RenderProcessHost of the |navigating_frame_host|. | |
720 navigation_handle_->SetSpeculativeProcessID( | |
721 navigating_frame_host->GetProcess()->GetID(), !may_transfer_); | |
Charlie Reis
2017/05/15 03:41:52
Yes, let's revisit https://codereview.chromium.org
clamy
2017/05/16 14:50:45
The parameter was removed, though we should revisi
| |
722 | |
718 BrowserContext* browser_context = | 723 BrowserContext* browser_context = |
719 frame_tree_node_->navigator()->GetController()->GetBrowserContext(); | 724 frame_tree_node_->navigator()->GetController()->GetBrowserContext(); |
720 StoragePartition* partition = BrowserContext::GetStoragePartition( | 725 StoragePartition* partition = BrowserContext::GetStoragePartition( |
721 browser_context, navigating_frame_host->GetSiteInstance()); | 726 browser_context, navigating_frame_host->GetSiteInstance()); |
722 DCHECK(partition); | 727 DCHECK(partition); |
723 | 728 |
724 // Only initialize the ServiceWorkerNavigationHandle if it can be created for | 729 // Only initialize the ServiceWorkerNavigationHandle if it can be created for |
725 // this frame. | 730 // this frame. |
726 bool can_create_service_worker = | 731 bool can_create_service_worker = |
727 (frame_tree_node_->pending_sandbox_flags() & | 732 (frame_tree_node_->pending_sandbox_flags() & |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
862 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); | 867 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); |
863 | 868 |
864 render_frame_host->CommitNavigation(response_.get(), std::move(body_), | 869 render_frame_host->CommitNavigation(response_.get(), std::move(body_), |
865 std::move(handle_), common_params_, | 870 std::move(handle_), common_params_, |
866 request_params_, is_view_source_); | 871 request_params_, is_view_source_); |
867 | 872 |
868 frame_tree_node_->ResetNavigationRequest(true, true); | 873 frame_tree_node_->ResetNavigationRequest(true, true); |
869 } | 874 } |
870 | 875 |
871 } // namespace content | 876 } // namespace content |
OLD | NEW |