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

Unified Diff: content/child/resource_dispatcher.cc

Issue 736743003: Use content::Referrer to pass around referrers in the plugin code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 6 years, 1 month 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/child/request_info.cc ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index ea91f9571120d334c6beaaf1d9d364cf413764a3..0e8bd3647a071acdc13fae38d47e1b12765e9906 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -116,8 +116,8 @@ IPCResourceLoaderBridge::IPCResourceLoaderBridge(
request_.method = request_info.method;
request_.url = request_info.url;
request_.first_party_for_cookies = request_info.first_party_for_cookies;
- request_.referrer = request_info.referrer;
- request_.referrer_policy = request_info.referrer_policy;
+ request_.referrer = request_info.referrer.url;
+ request_.referrer_policy = request_info.referrer.policy;
request_.headers = request_info.headers;
request_.load_flags = request_info.load_flags;
request_.origin_pid = request_info.requestor_pid;
@@ -135,17 +135,17 @@ IPCResourceLoaderBridge::IPCResourceLoaderBridge(
request_.enable_load_timing = request_info.enable_load_timing;
request_.enable_upload_progress = request_info.enable_upload_progress;
- if ((request_info.referrer_policy == blink::WebReferrerPolicyDefault ||
- request_info.referrer_policy ==
+ if ((request_info.referrer.policy == blink::WebReferrerPolicyDefault ||
+ request_info.referrer.policy ==
blink::WebReferrerPolicyNoReferrerWhenDowngrade) &&
- request_info.referrer.SchemeIsSecure() &&
+ request_info.referrer.url.SchemeIsSecure() &&
!request_info.url.SchemeIsSecure()) {
// Debug code for crbug.com/422871
base::debug::DumpWithoutCrashing();
DLOG(FATAL) << "Trying to send secure referrer for insecure request "
<< "without an appropriate referrer policy.\n"
<< "URL = " << request_info.url << "\n"
- << "Referrer = " << request_info.referrer;
+ << "Referrer = " << request_info.referrer.url;
}
const RequestExtraData kEmptyData;
« no previous file with comments | « content/child/request_info.cc ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698