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

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

Issue 2918313002: Implement new referrer policies (Closed)
Patch Set: update public/platform/OWNERS per presubmit Created 3 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
« no previous file with comments | « content/browser/devtools/protocol/network_handler.cc ('k') | content/public/common/referrer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 case net::URLRequest:: 179 case net::URLRequest::
180 REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN: 180 REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN:
181 return blink:: 181 return blink::
182 kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin; 182 kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin;
183 case net::URLRequest::ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN: 183 case net::URLRequest::ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN:
184 return blink::kWebReferrerPolicyOriginWhenCrossOrigin; 184 return blink::kWebReferrerPolicyOriginWhenCrossOrigin;
185 case net::URLRequest::NEVER_CLEAR_REFERRER: 185 case net::URLRequest::NEVER_CLEAR_REFERRER:
186 return blink::kWebReferrerPolicyAlways; 186 return blink::kWebReferrerPolicyAlways;
187 case net::URLRequest::ORIGIN: 187 case net::URLRequest::ORIGIN:
188 return blink::kWebReferrerPolicyOrigin; 188 return blink::kWebReferrerPolicyOrigin;
189 case net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN:
190 return blink::kWebReferrerPolicySameOrigin;
191 case net::URLRequest::ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE:
192 return blink::kWebReferrerPolicyStrictOrigin;
189 case net::URLRequest::NO_REFERRER: 193 case net::URLRequest::NO_REFERRER:
190 return blink::kWebReferrerPolicyNever; 194 return blink::kWebReferrerPolicyNever;
191 case net::URLRequest::MAX_REFERRER_POLICY: 195 case net::URLRequest::MAX_REFERRER_POLICY:
192 NOTREACHED(); 196 NOTREACHED();
193 return blink::kWebReferrerPolicyDefault; 197 return blink::kWebReferrerPolicyDefault;
194 } 198 }
195 NOTREACHED(); 199 NOTREACHED();
196 return blink::kWebReferrerPolicyDefault; 200 return blink::kWebReferrerPolicyDefault;
197 } 201 }
198 202
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 int intra_priority_value) { 1280 int intra_priority_value) {
1277 context_->DidChangePriority(new_priority, intra_priority_value); 1281 context_->DidChangePriority(new_priority, intra_priority_value);
1278 } 1282 }
1279 1283
1280 void WebURLLoaderImpl::SetLoadingTaskRunner( 1284 void WebURLLoaderImpl::SetLoadingTaskRunner(
1281 base::SingleThreadTaskRunner* loading_task_runner) { 1285 base::SingleThreadTaskRunner* loading_task_runner) {
1282 context_->SetTaskRunner(loading_task_runner); 1286 context_->SetTaskRunner(loading_task_runner);
1283 } 1287 }
1284 1288
1285 } // namespace content 1289 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/network_handler.cc ('k') | content/public/common/referrer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698