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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 if (navigation_handle_->navigation_ui_data()) | 739 if (navigation_handle_->navigation_ui_data()) |
740 navigation_ui_data = navigation_handle_->navigation_ui_data()->Clone(); | 740 navigation_ui_data = navigation_handle_->navigation_ui_data()->Clone(); |
741 | 741 |
742 bool is_for_guests_only = | 742 bool is_for_guests_only = |
743 navigation_handle_->GetStartingSiteInstance()->GetSiteURL(). | 743 navigation_handle_->GetStartingSiteInstance()->GetSiteURL(). |
744 SchemeIs(kGuestScheme); | 744 SchemeIs(kGuestScheme); |
745 | 745 |
746 bool report_raw_headers = | 746 bool report_raw_headers = |
747 RenderFrameDevToolsAgentHost::IsNetworkHandlerEnabled(frame_tree_node_); | 747 RenderFrameDevToolsAgentHost::IsNetworkHandlerEnabled(frame_tree_node_); |
748 | 748 |
| 749 std::string devtools_agent_host_id; |
| 750 if (report_raw_headers) { |
| 751 devtools_agent_host_id = |
| 752 RenderFrameDevToolsAgentHost::GetAgentHostId(frame_tree_node_); |
| 753 } |
| 754 |
749 loader_ = NavigationURLLoader::Create( | 755 loader_ = NavigationURLLoader::Create( |
750 browser_context->GetResourceContext(), partition, | 756 browser_context->GetResourceContext(), partition, |
751 base::MakeUnique<NavigationRequestInfo>( | 757 base::MakeUnique<NavigationRequestInfo>( |
752 common_params_, begin_params_, first_party_for_cookies, | 758 common_params_, begin_params_, first_party_for_cookies, |
753 frame_tree_node_->IsMainFrame(), parent_is_main_frame, | 759 frame_tree_node_->IsMainFrame(), parent_is_main_frame, |
754 IsSecureFrame(frame_tree_node_->parent()), | 760 IsSecureFrame(frame_tree_node_->parent()), |
755 frame_tree_node_->frame_tree_node_id(), is_for_guests_only, | 761 frame_tree_node_->frame_tree_node_id(), is_for_guests_only, |
756 report_raw_headers, navigating_frame_host->GetVisibilityState()), | 762 report_raw_headers, navigating_frame_host->GetVisibilityState(), |
| 763 devtools_agent_host_id, request_params_.devtools_request_id), |
757 std::move(navigation_ui_data), | 764 std::move(navigation_ui_data), |
758 navigation_handle_->service_worker_handle(), | 765 navigation_handle_->service_worker_handle(), |
759 navigation_handle_->appcache_handle(), this); | 766 navigation_handle_->appcache_handle(), this); |
760 } | 767 } |
761 | 768 |
762 void NavigationRequest::OnRedirectChecksComplete( | 769 void NavigationRequest::OnRedirectChecksComplete( |
763 NavigationThrottle::ThrottleCheckResult result) { | 770 NavigationThrottle::ThrottleCheckResult result) { |
764 DCHECK(result != NavigationThrottle::DEFER); | 771 DCHECK(result != NavigationThrottle::DEFER); |
765 DCHECK(result != NavigationThrottle::BLOCK_RESPONSE); | 772 DCHECK(result != NavigationThrottle::BLOCK_RESPONSE); |
766 | 773 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); | 844 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); |
838 | 845 |
839 render_frame_host->CommitNavigation(response_.get(), std::move(body_), | 846 render_frame_host->CommitNavigation(response_.get(), std::move(body_), |
840 common_params_, request_params_, | 847 common_params_, request_params_, |
841 is_view_source_); | 848 is_view_source_); |
842 | 849 |
843 frame_tree_node_->ResetNavigationRequest(true, true); | 850 frame_tree_node_->ResetNavigationRequest(true, true); |
844 } | 851 } |
845 | 852 |
846 } // namespace content | 853 } // namespace content |
OLD | NEW |