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

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

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/platform/transforms/TransformOperationsTest.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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/transforms/TransformOperationsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698