| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 const String& destinationProtocol, | 243 const String& destinationProtocol, |
| 244 const String& destinationDomain, | 244 const String& destinationDomain, |
| 245 bool allowDestinationSubdomains) { | 245 bool allowDestinationSubdomains) { |
| 246 ASSERT(isMainThread()); | 246 ASSERT(isMainThread()); |
| 247 ASSERT(!sourceOrigin.isUnique()); | 247 ASSERT(!sourceOrigin.isUnique()); |
| 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().insert(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->push_back(OriginAccessEntry( | 258 list->push_back(OriginAccessEntry( |
| 259 destinationProtocol, destinationDomain, | 259 destinationProtocol, destinationDomain, |
| 260 allowDestinationSubdomains ? OriginAccessEntry::AllowSubdomains | 260 allowDestinationSubdomains ? OriginAccessEntry::AllowSubdomains |
| 261 : OriginAccessEntry::DisallowSubdomains)); | 261 : OriginAccessEntry::DisallowSubdomains)); |
| 262 } | 262 } |
| 263 | 263 |
| (...skipping 40 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 |