tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

CacheIndexContextIterator.cpp (909B)


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