CacheIndexContextIterator.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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/. */
  4. #include "CacheLog.h"
  5. #include "CacheIndexContextIterator.h"
  6. #include "CacheIndex.h"
  7. #include "nsString.h"
  8. namespace mozilla {
  9. namespace net {
  10. CacheIndexContextIterator::CacheIndexContextIterator(CacheIndex *aIndex,
  11. bool aAddNew,
  12. nsILoadContextInfo *aInfo)
  13. : CacheIndexIterator(aIndex, aAddNew)
  14. , mInfo(aInfo)
  15. {
  16. }
  17. CacheIndexContextIterator::~CacheIndexContextIterator()
  18. {
  19. }
  20. void
  21. CacheIndexContextIterator::AddRecord(CacheIndexRecordWrapper* aRecord,
  22. const StaticMutexAutoLock& aProofOfLock)
  23. {
  24. if (CacheIndexEntry::RecordMatchesLoadContextInfo(aRecord, mInfo)) {
  25. CacheIndexIterator::AddRecord(aRecord, aProofOfLock);
  26. }
  27. }
  28. } // namespace net
  29. } // namespace mozilla