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

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

Issue 2776203002: Migrate WTF::Vector::remove() to ::erase() (Closed)
Patch Set: rebase, repatch VectorTest Created 3 years, 8 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
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 OriginAccessWhiteList* list = it->value.get(); 239 OriginAccessWhiteList* list = it->value.get();
240 size_t index = list->find(OriginAccessEntry( 240 size_t index = list->find(OriginAccessEntry(
241 destinationProtocol, destinationDomain, 241 destinationProtocol, destinationDomain,
242 allowDestinationSubdomains ? OriginAccessEntry::AllowSubdomains 242 allowDestinationSubdomains ? OriginAccessEntry::AllowSubdomains
243 : OriginAccessEntry::DisallowSubdomains)); 243 : OriginAccessEntry::DisallowSubdomains));
244 244
245 if (index == kNotFound) 245 if (index == kNotFound)
246 return; 246 return;
247 247
248 list->remove(index); 248 list->erase(index);
249 249
250 if (list->isEmpty()) 250 if (list->isEmpty())
251 map.erase(it); 251 map.erase(it);
252 } 252 }
253 253
254 void SecurityPolicy::resetOriginAccessWhitelists() { 254 void SecurityPolicy::resetOriginAccessWhitelists() {
255 ASSERT(isMainThread()); 255 ASSERT(isMainThread());
256 originAccessMap().clear(); 256 originAccessMap().clear();
257 } 257 }
258 258
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 309 }
310 310
311 if (referrerPolicy == ReferrerPolicyDefault) 311 if (referrerPolicy == ReferrerPolicyDefault)
312 return false; 312 return false;
313 313
314 *result = referrerPolicy; 314 *result = referrerPolicy;
315 return true; 315 return true;
316 } 316 }
317 317
318 } // namespace blink 318 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/text/TextBreakIteratorICU.cpp ('k') | third_party/WebKit/Source/platform/wtf/Vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698