OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 return Referrer(ShouldHideReferrer(url, referrer_url) | 134 return Referrer(ShouldHideReferrer(url, referrer_url) |
135 ? Referrer::NoReferrer() | 135 ? Referrer::NoReferrer() |
136 : origin + "/", | 136 : origin + "/", |
137 referrer_policy_no_default); | 137 referrer_policy_no_default); |
138 } | 138 } |
139 break; | 139 break; |
140 } | 140 } |
141 case kReferrerPolicyNoReferrerWhenDowngrade: | 141 case kReferrerPolicyNoReferrerWhenDowngrade: |
142 break; | 142 break; |
143 case kReferrerPolicyDefault: | 143 case kReferrerPolicyDefault: |
144 ASSERT_NOT_REACHED(); | 144 NOTREACHED(); |
145 break; | 145 break; |
146 } | 146 } |
147 | 147 |
148 return Referrer( | 148 return Referrer( |
149 ShouldHideReferrer(url, referrer_url) ? Referrer::NoReferrer() : referrer, | 149 ShouldHideReferrer(url, referrer_url) ? Referrer::NoReferrer() : referrer, |
150 referrer_policy_no_default); | 150 referrer_policy_no_default); |
151 } | 151 } |
152 | 152 |
153 void SecurityPolicy::AddOriginTrustworthyWhiteList( | 153 void SecurityPolicy::AddOriginTrustworthyWhiteList( |
154 PassRefPtr<SecurityOrigin> origin) { | 154 PassRefPtr<SecurityOrigin> origin) { |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 } | 310 } |
311 | 311 |
312 if (referrer_policy == kReferrerPolicyDefault) | 312 if (referrer_policy == kReferrerPolicyDefault) |
313 return false; | 313 return false; |
314 | 314 |
315 *result = referrer_policy; | 315 *result = referrer_policy; |
316 return true; | 316 return true; |
317 } | 317 } |
318 | 318 |
319 } // namespace blink | 319 } // namespace blink |
OLD | NEW |