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

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp

Issue 2552233002: Make ifdefs consistent in WebKit/Source/platform (Closed)
Patch Set: Created 4 years 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 | « third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 break; 186 break;
187 } 187 }
188 188
189 return Referrer( 189 return Referrer(
190 shouldHideReferrer(url, referrerUrl) ? Referrer::noReferrer() : referrer, 190 shouldHideReferrer(url, referrerUrl) ? Referrer::noReferrer() : referrer,
191 referrerPolicyNoDefault); 191 referrerPolicyNoDefault);
192 } 192 }
193 193
194 void SecurityPolicy::addOriginTrustworthyWhiteList( 194 void SecurityPolicy::addOriginTrustworthyWhiteList(
195 PassRefPtr<SecurityOrigin> origin) { 195 PassRefPtr<SecurityOrigin> origin) {
196 #if DCHECK_IS_ON()
196 // Must be called before we start other threads. 197 // Must be called before we start other threads.
197 ASSERT(WTF::isBeforeThreadCreated()); 198 DCHECK(WTF::isBeforeThreadCreated());
199 #endif
198 if (origin->isUnique()) 200 if (origin->isUnique())
199 return; 201 return;
200 trustworthyOriginSet().add(origin->toRawString()); 202 trustworthyOriginSet().add(origin->toRawString());
201 } 203 }
202 204
203 bool SecurityPolicy::isOriginWhiteListedTrustworthy( 205 bool SecurityPolicy::isOriginWhiteListedTrustworthy(
204 const SecurityOrigin& origin) { 206 const SecurityOrigin& origin) {
205 // Early return if there are no whitelisted origins to avoid unnecessary 207 // Early return if there are no whitelisted origins to avoid unnecessary
206 // allocations, copies, and frees. 208 // allocations, copies, and frees.
207 if (origin.isUnique() || trustworthyOriginSet().isEmpty()) 209 if (origin.isUnique() || trustworthyOriginSet().isEmpty())
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 } 304 }
303 305
304 bool SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords( 306 bool SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(
305 const String& policy, 307 const String& policy,
306 ReferrerPolicy* result) { 308 ReferrerPolicy* result) {
307 return referrerPolicyFromStringImpl( 309 return referrerPolicyFromStringImpl(
308 policy, SupportReferrerPolicyLegacyKeywords, result); 310 policy, SupportReferrerPolicyLegacyKeywords, result);
309 } 311 }
310 312
311 } // namespace blink 313 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698