Bug 1866777 - Disable test_race_cache_with_network.js on windows opt for frequent...
[gecko.git] / netwerk / cache2 / CacheIndexContextIterator.cpp
bloba523b21915431baa7330ac2e755ce745c6ef7626
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "CacheLog.h"
6 #include "CacheIndexContextIterator.h"
7 #include "CacheIndex.h"
8 #include "nsString.h"
10 namespace mozilla::net {
12 CacheIndexContextIterator::CacheIndexContextIterator(CacheIndex* aIndex,
13 bool aAddNew,
14 nsILoadContextInfo* aInfo)
15 : CacheIndexIterator(aIndex, aAddNew), mInfo(aInfo) {}
17 void CacheIndexContextIterator::AddRecord(
18 CacheIndexRecordWrapper* aRecord, const StaticMutexAutoLock& aProofOfLock) {
19 if (CacheIndexEntry::RecordMatchesLoadContextInfo(aRecord, mInfo)) {
20 CacheIndexIterator::AddRecord(aRecord, aProofOfLock);
24 } // namespace mozilla::net