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

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

Issue 2797443005: PlzNavigate data pipe
Patch Set: cleanup 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
« no previous file with comments | « content/browser/frame_host/navigation_request.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index e3937476e64ddce4e86255d8167a7a219a19ec20..99dc7014e3e3d61348ba881038a8888a4d5ed60a 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -36,7 +36,6 @@
#include "content/public/browser/navigation_ui_data.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/storage_partition.h"
-#include "content/public/browser/stream_handle.h"
#include "content/public/common/appcache_info.h"
#include "content/public/common/content_client.h"
#include "content/public/common/origin_util.h"
@@ -508,12 +507,13 @@ void NavigationRequest::OnRequestRedirected(
void NavigationRequest::OnResponseStarted(
const scoped_refptr<ResourceResponse>& response,
- std::unique_ptr<StreamHandle> body,
+ mojo::ScopedDataPipeConsumerHandle handle,
const SSLStatus& ssl_status,
std::unique_ptr<NavigationData> navigation_data,
const GlobalRequestID& request_id,
bool is_download,
bool is_stream) {
+ DCHECK(handle.is_valid());
DCHECK(state_ == STARTED);
DCHECK(response);
state_ = RESPONSE_STARTED;
@@ -578,9 +578,9 @@ void NavigationRequest::OnResponseStarted(
if (navigation_data)
navigation_handle_->set_navigation_data(std::move(navigation_data));
- // Store the response and the StreamHandle until checks have been processed.
+ // Store the response and the data pipe until checks have been processed.
response_ = response;
- body_ = std::move(body);
+ handle_ = std::move(handle);
// Check if the navigation should be allowed to proceed.
navigation_handle_->WillProcessResponse(
@@ -842,7 +842,7 @@ void NavigationRequest::CommitNavigation() {
DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture);
- render_frame_host->CommitNavigation(response_.get(), std::move(body_),
+ render_frame_host->CommitNavigation(response_.get(), std::move(handle_),
common_params_, request_params_,
is_view_source_);
« no previous file with comments | « content/browser/frame_host/navigation_request.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698