| Index: content/browser/frame_host/render_frame_host_impl.cc
|
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
| index 260b7da66bc036c94f40882800a84f7a8d40f3e1..65c98058441909997c5e51c6514cbc9f638c7fdc 100644
|
| --- a/content/browser/frame_host/render_frame_host_impl.cc
|
| +++ b/content/browser/frame_host/render_frame_host_impl.cc
|
| @@ -106,6 +106,7 @@
|
| #include "media/mojo/interfaces/remoting.mojom.h"
|
| #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
|
| #include "mojo/public/cpp/bindings/strong_binding.h"
|
| +#include "mojo/public/cpp/system/data_pipe.h"
|
| #include "services/service_manager/public/cpp/connector.h"
|
| #include "services/service_manager/public/cpp/interface_provider.h"
|
| #include "ui/accessibility/ax_tree.h"
|
| @@ -2650,8 +2651,8 @@ void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) {
|
| base::Optional<SourceLocation>(),
|
| CSPDisposition::CHECK /* should_check_main_world_csp */);
|
| if (IsBrowserSideNavigationEnabled()) {
|
| - CommitNavigation(nullptr, nullptr, common_params, RequestNavigationParams(),
|
| - false);
|
| + CommitNavigation(nullptr, nullptr, mojo::ScopedDataPipeConsumerHandle(),
|
| + common_params, RequestNavigationParams(), false);
|
| } else {
|
| Navigate(common_params, StartNavigationParams(), RequestNavigationParams());
|
| }
|
| @@ -2810,11 +2811,12 @@ void RenderFrameHostImpl::SendJavaScriptDialogReply(
|
| void RenderFrameHostImpl::CommitNavigation(
|
| ResourceResponse* response,
|
| std::unique_ptr<StreamHandle> body,
|
| + mojo::ScopedDataPipeConsumerHandle handle,
|
| const CommonNavigationParams& common_params,
|
| const RequestNavigationParams& request_params,
|
| bool is_view_source) {
|
| DCHECK(
|
| - (response && body.get()) ||
|
| + (response && (body.get() || handle.is_valid())) ||
|
| common_params.url.SchemeIs(url::kDataScheme) ||
|
| !ShouldMakeNetworkRequestForURL(common_params.url) ||
|
| FrameMsg_Navigate_Type::IsSameDocument(common_params.navigation_type) ||
|
| @@ -2836,8 +2838,16 @@ void RenderFrameHostImpl::CommitNavigation(
|
| const GURL body_url = body.get() ? body->GetURL() : GURL();
|
| const ResourceResponseHead head = response ?
|
| response->head : ResourceResponseHead();
|
| - Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, common_params,
|
| - request_params));
|
| + const bool network_service_enabled =
|
| + base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableNetworkService);
|
| + if (network_service_enabled) {
|
| + Send(new FrameMsg_CommitNavigationNetworkService(
|
| + routing_id_, head, handle.release(), common_params, request_params));
|
| + } else {
|
| + Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url,
|
| + common_params, request_params));
|
| + }
|
|
|
| // If a network request was made, update the Previews state.
|
| if (ShouldMakeNetworkRequestForURL(common_params.url) &&
|
|
|