| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 if (sourceOrigin.isUnique()) | 248 if (sourceOrigin.isUnique()) |
| 249 return; | 249 return; |
| 250 | 250 |
| 251 String sourceString = sourceOrigin.toString(); | 251 String sourceString = sourceOrigin.toString(); |
| 252 OriginAccessMap::AddResult result = | 252 OriginAccessMap::AddResult result = |
| 253 originAccessMap().add(sourceString, nullptr); | 253 originAccessMap().add(sourceString, nullptr); |
| 254 if (result.isNewEntry) | 254 if (result.isNewEntry) |
| 255 result.storedValue->value = WTF::wrapUnique(new OriginAccessWhiteList); | 255 result.storedValue->value = WTF::wrapUnique(new OriginAccessWhiteList); |
| 256 | 256 |
| 257 OriginAccessWhiteList* list = result.storedValue->value.get(); | 257 OriginAccessWhiteList* list = result.storedValue->value.get(); |
| 258 list->append(OriginAccessEntry(destinationProtocol, destinationDomain, | 258 list->push_back(OriginAccessEntry( |
| 259 allowDestinationSubdomains | 259 destinationProtocol, destinationDomain, |
| 260 ? OriginAccessEntry::AllowSubdomains | 260 allowDestinationSubdomains ? OriginAccessEntry::AllowSubdomains |
| 261 : OriginAccessEntry::DisallowSubdomains)); | 261 : OriginAccessEntry::DisallowSubdomains)); |
| 262 } | 262 } |
| 263 | 263 |
| 264 void SecurityPolicy::removeOriginAccessWhitelistEntry( | 264 void SecurityPolicy::removeOriginAccessWhitelistEntry( |
| 265 const SecurityOrigin& sourceOrigin, | 265 const SecurityOrigin& sourceOrigin, |
| 266 const String& destinationProtocol, | 266 const String& destinationProtocol, |
| 267 const String& destinationDomain, | 267 const String& destinationDomain, |
| 268 bool allowDestinationSubdomains) { | 268 bool allowDestinationSubdomains) { |
| 269 ASSERT(isMainThread()); | 269 ASSERT(isMainThread()); |
| 270 ASSERT(!sourceOrigin.isUnique()); | 270 ASSERT(!sourceOrigin.isUnique()); |
| 271 if (sourceOrigin.isUnique()) | 271 if (sourceOrigin.isUnique()) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 } | 304 } |
| 305 | 305 |
| 306 bool SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords( | 306 bool SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords( |
| 307 const String& policy, | 307 const String& policy, |
| 308 ReferrerPolicy* result) { | 308 ReferrerPolicy* result) { |
| 309 return referrerPolicyFromStringImpl( | 309 return referrerPolicyFromStringImpl( |
| 310 policy, SupportReferrerPolicyLegacyKeywords, result); | 310 policy, SupportReferrerPolicyLegacyKeywords, result); |
| 311 } | 311 } |
| 312 | 312 |
| 313 } // namespace blink | 313 } // namespace blink |
| OLD | NEW |