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

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

Issue 2053693002: WIP: Move 'Upgrade-Insecure-Requests' to the browser process. Base URL: https://chromium.googlesource.com/chromium/src.git@replicate
Patch Set: Rebase. :( Created 3 years, 10 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 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 resource_request->enable_load_timing = true; 593 resource_request->enable_load_timing = true;
594 resource_request->enable_upload_progress = request.reportUploadProgress(); 594 resource_request->enable_upload_progress = request.reportUploadProgress();
595 if (request.getRequestContext() == 595 if (request.getRequestContext() ==
596 WebURLRequest::RequestContextXMLHttpRequest && 596 WebURLRequest::RequestContextXMLHttpRequest &&
597 (url.has_username() || url.has_password())) { 597 (url.has_username() || url.has_password())) {
598 resource_request->do_not_prompt_for_login = true; 598 resource_request->do_not_prompt_for_login = true;
599 } 599 }
600 resource_request->report_raw_headers = request.reportRawHeaders(); 600 resource_request->report_raw_headers = request.reportRawHeaders();
601 resource_request->previews_state = 601 resource_request->previews_state =
602 static_cast<PreviewsState>(request.getPreviewsState()); 602 static_cast<PreviewsState>(request.getPreviewsState());
603 resource_request->insecure_request_policy =
604 request.getInsecureRequestPolicy();
603 605
604 // PlzNavigate: during navigation, the renderer should request a stream which 606 // PlzNavigate: during navigation, the renderer should request a stream which
605 // contains the body of the response. The network request has already been 607 // contains the body of the response. The network request has already been
606 // made by the browser. 608 // made by the browser.
607 if (stream_override_.get()) { 609 if (stream_override_.get()) {
608 CHECK(IsBrowserSideNavigationEnabled()); 610 CHECK(IsBrowserSideNavigationEnabled());
609 DCHECK(!sync_load_response); 611 DCHECK(!sync_load_response);
610 DCHECK_NE(WebURLRequest::FrameTypeNone, request.getFrameType()); 612 DCHECK_NE(WebURLRequest::FrameTypeNone, request.getFrameType());
611 resource_request->resource_body_stream_url = stream_override_->stream_url; 613 resource_request->resource_body_stream_url = stream_override_->stream_url;
612 } 614 }
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 int intra_priority_value) { 1249 int intra_priority_value) {
1248 context_->DidChangePriority(new_priority, intra_priority_value); 1250 context_->DidChangePriority(new_priority, intra_priority_value);
1249 } 1251 }
1250 1252
1251 void WebURLLoaderImpl::setLoadingTaskRunner( 1253 void WebURLLoaderImpl::setLoadingTaskRunner(
1252 base::SingleThreadTaskRunner* loading_task_runner) { 1254 base::SingleThreadTaskRunner* loading_task_runner) {
1253 context_->SetTaskRunner(loading_task_runner); 1255 context_->SetTaskRunner(loading_task_runner);
1254 } 1256 }
1255 1257
1256 } // namespace content 1258 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698