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

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

Issue 2918313002: Implement new referrer policies (Closed)
Patch Set: rebase 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
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 case net::URLRequest:: 180 case net::URLRequest::
181 REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN: 181 REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN:
182 return blink:: 182 return blink::
183 kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin; 183 kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin;
184 case net::URLRequest::ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN: 184 case net::URLRequest::ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN:
185 return blink::kWebReferrerPolicyOriginWhenCrossOrigin; 185 return blink::kWebReferrerPolicyOriginWhenCrossOrigin;
186 case net::URLRequest::NEVER_CLEAR_REFERRER: 186 case net::URLRequest::NEVER_CLEAR_REFERRER:
187 return blink::kWebReferrerPolicyAlways; 187 return blink::kWebReferrerPolicyAlways;
188 case net::URLRequest::ORIGIN: 188 case net::URLRequest::ORIGIN:
189 return blink::kWebReferrerPolicyOrigin; 189 return blink::kWebReferrerPolicyOrigin;
190 case net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN:
191 return blink::kWebReferrerPolicySameOrigin;
192 case net::URLRequest::ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE:
193 return blink::kWebReferrerPolicyStrictOrigin;
190 case net::URLRequest::NO_REFERRER: 194 case net::URLRequest::NO_REFERRER:
191 return blink::kWebReferrerPolicyNever; 195 return blink::kWebReferrerPolicyNever;
192 case net::URLRequest::MAX_REFERRER_POLICY: 196 case net::URLRequest::MAX_REFERRER_POLICY:
193 NOTREACHED(); 197 NOTREACHED();
194 return blink::kWebReferrerPolicyDefault; 198 return blink::kWebReferrerPolicyDefault;
195 } 199 }
196 NOTREACHED(); 200 NOTREACHED();
197 return blink::kWebReferrerPolicyDefault; 201 return blink::kWebReferrerPolicyDefault;
198 } 202 }
199 203
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 int intra_priority_value) { 1292 int intra_priority_value) {
1289 context_->DidChangePriority(new_priority, intra_priority_value); 1293 context_->DidChangePriority(new_priority, intra_priority_value);
1290 } 1294 }
1291 1295
1292 void WebURLLoaderImpl::SetLoadingTaskRunner( 1296 void WebURLLoaderImpl::SetLoadingTaskRunner(
1293 base::SingleThreadTaskRunner* loading_task_runner) { 1297 base::SingleThreadTaskRunner* loading_task_runner) {
1294 context_->SetTaskRunner(loading_task_runner); 1298 context_->SetTaskRunner(loading_task_runner);
1295 } 1299 }
1296 1300
1297 } // namespace content 1301 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698