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/. */
6 #include "CacheIndexContextIterator.h"
7 #include "CacheIndex.h"
10 namespace mozilla::net
{
12 CacheIndexContextIterator::CacheIndexContextIterator(CacheIndex
* aIndex
,
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