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

Side by Side Diff: content/child/web_url_loader_impl.cc

Issue 1678303004: PlzNavigate: inform the renderer that a navigation is a POST (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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/child/web_url_loader_impl.h" 5 #include "content/child/web_url_loader_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 scoped_refptr<ResourceRequestBody> request_body = 547 scoped_refptr<ResourceRequestBody> request_body =
548 GetRequestBodyForWebURLRequest(request).get(); 548 GetRequestBodyForWebURLRequest(request).get();
549 549
550 // PlzNavigate: during navigation, the renderer should request a stream which 550 // PlzNavigate: during navigation, the renderer should request a stream which
551 // contains the body of the response. The network request has already been 551 // contains the body of the response. The network request has already been
552 // made by the browser. 552 // made by the browser.
553 if (stream_override_.get()) { 553 if (stream_override_.get()) {
554 CHECK(IsBrowserSideNavigationEnabled()); 554 CHECK(IsBrowserSideNavigationEnabled());
555 DCHECK(!sync_load_response); 555 DCHECK(!sync_load_response);
556 DCHECK_NE(WebURLRequest::FrameTypeNone, request.frameType()); 556 DCHECK_NE(WebURLRequest::FrameTypeNone, request.frameType());
557 DCHECK_EQ("GET", request.httpMethod().latin1());
558 request_info.resource_body_stream_url = stream_override_->stream_url; 557 request_info.resource_body_stream_url = stream_override_->stream_url;
559 } 558 }
560 559
561 if (sync_load_response) { 560 if (sync_load_response) {
562 resource_dispatcher_->StartSync( 561 resource_dispatcher_->StartSync(
563 request_info, request_body.get(), sync_load_response); 562 request_info, request_body.get(), sync_load_response);
564 return; 563 return;
565 } 564 }
566 565
567 request_id_ = resource_dispatcher_->StartAsync( 566 request_id_ = resource_dispatcher_->StartAsync(
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 } 1153 }
1155 1154
1156 void WebURLLoaderImpl::setLoadingTaskRunner( 1155 void WebURLLoaderImpl::setLoadingTaskRunner(
1157 blink::WebTaskRunner* loading_task_runner) { 1156 blink::WebTaskRunner* loading_task_runner) {
1158 // There's no guarantee on the lifetime of |loading_task_runner| so we take a 1157 // There's no guarantee on the lifetime of |loading_task_runner| so we take a
1159 // copy. 1158 // copy.
1160 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone())); 1159 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone()));
1161 } 1160 }
1162 1161
1163 } // namespace content 1162 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698