Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(707)

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2813243002: network service: pass PlzNavigate resulting data via mojo data pipe (Closed)
Patch Set: ahem Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 55d6a08eced5a705888db727291502979b46785e..22394e1ef9373d74449df9b49dbffeff27813b77 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -105,6 +105,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"
@@ -2642,8 +2643,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());
}
@@ -2802,11 +2803,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) ||
@@ -2828,7 +2830,8 @@ 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,
+ Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url,
+ handle.release(), common_params,
request_params));
// If a network request was made, update the Previews state.
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/loader/navigation_url_loader_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698