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

Unified Diff: net/url_request/url_request.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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index a8f62510247d0067d7bbd0d61c6fbeee1b1a4c81..c12eb684c48351e8a2fa6a331c24b0c156224c5a 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -455,6 +455,12 @@ void URLRequest::set_first_party_url_policy(
first_party_url_policy_ = first_party_url_policy;
}
+void URLRequest::set_insecure_request_policy(
+ InsecureRequestPolicy insecure_request_policy) {
+ DCHECK(!is_pending_);
+ insecure_request_policy_ = insecure_request_policy;
+}
+
void URLRequest::set_initiator(const url::Origin& initiator) {
DCHECK(!is_pending_);
initiator_ = initiator;
@@ -546,6 +552,7 @@ URLRequest::URLRequest(const GURL& url,
method_("GET"),
referrer_policy_(CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE),
first_party_url_policy_(NEVER_CHANGE_FIRST_PARTY_URL),
+ insecure_request_policy_(DO_NOT_UPGRADE_INSECURE_REQUESTS),
load_flags_(LOAD_NORMAL),
delegate_(delegate),
is_pending_(false),

Powered by Google App Engine
This is Rietveld 408576698