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

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: Created 4 years, 6 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 GetFetchCredentialsModeForWebURLRequest(request); 514 GetFetchCredentialsModeForWebURLRequest(request);
515 request_info.fetch_redirect_mode = 515 request_info.fetch_redirect_mode =
516 GetFetchRedirectModeForWebURLRequest(request); 516 GetFetchRedirectModeForWebURLRequest(request);
517 request_info.fetch_request_context_type = 517 request_info.fetch_request_context_type =
518 GetRequestContextTypeForWebURLRequest(request); 518 GetRequestContextTypeForWebURLRequest(request);
519 request_info.fetch_frame_type = 519 request_info.fetch_frame_type =
520 GetRequestContextFrameTypeForWebURLRequest(request); 520 GetRequestContextFrameTypeForWebURLRequest(request);
521 request_info.extra_data = request.getExtraData(); 521 request_info.extra_data = request.getExtraData();
522 request_info.report_raw_headers = request.reportRawHeaders(); 522 request_info.report_raw_headers = request.reportRawHeaders();
523 request_info.loading_web_task_runner.reset(web_task_runner_->clone()); 523 request_info.loading_web_task_runner.reset(web_task_runner_->clone());
524 request_info.insecure_request_policy = request.getInsecureRequestPolicy();
524 525
525 scoped_refptr<ResourceRequestBody> request_body = 526 scoped_refptr<ResourceRequestBody> request_body =
526 GetRequestBodyForWebURLRequest(request).get(); 527 GetRequestBodyForWebURLRequest(request).get();
527 528
528 // PlzNavigate: during navigation, the renderer should request a stream which 529 // PlzNavigate: during navigation, the renderer should request a stream which
529 // contains the body of the response. The network request has already been 530 // contains the body of the response. The network request has already been
530 // made by the browser. 531 // made by the browser.
531 if (stream_override_.get()) { 532 if (stream_override_.get()) {
532 CHECK(IsBrowserSideNavigationEnabled()); 533 CHECK(IsBrowserSideNavigationEnabled());
533 DCHECK(!sync_load_response); 534 DCHECK(!sync_load_response);
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 response->clearHTTPHeaderField(webStringName); 1199 response->clearHTTPHeaderField(webStringName);
1199 while (response_headers->EnumerateHeader(&iterator, name, &value)) { 1200 while (response_headers->EnumerateHeader(&iterator, name, &value)) {
1200 response->addHTTPHeaderField(webStringName, 1201 response->addHTTPHeaderField(webStringName,
1201 WebString::fromLatin1(value)); 1202 WebString::fromLatin1(value));
1202 } 1203 }
1203 } 1204 }
1204 return true; 1205 return true;
1205 } 1206 }
1206 1207
1207 } // namespace content 1208 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698