/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
uint32_t mCacheSize{0}; // Actual cache size in bytes
class TokenCacheRecord { public:
~TokenCacheRecord();
uint32_t Size() const; void Reset();
nsCString mKey;
PRUint32 mExpirationTime = 0;
nsTArray<uint8_t> mToken;
SessionCacheInfo mSessionCacheInfo; // An unique id to identify the record. Mostly used when we want to remove a // record from TokenCacheEntry.
uint64_t mId = 0;
};
class TokenCacheEntry { public:
uint32_t Size() const; // Add a record into |mRecords|. To make sure |mRecords| is sorted, we // iterate |mRecords| everytime to find a right place to insert the new // record. void AddRecord(UniquePtr<TokenCacheRecord>&& aRecord,
nsTArray<TokenCacheRecord*>& aExpirationArray); // This function returns the first record in |mRecords|. const UniquePtr<TokenCacheRecord>& Get();
UniquePtr<TokenCacheRecord> RemoveWithId(uint64_t aId);
uint32_t RecordCount() const { return mRecords.Length(); } const nsTArray<UniquePtr<TokenCacheRecord>>& Records() { return mRecords; }
private: // The records in this array are ordered by the expiration time.
nsTArray<UniquePtr<TokenCacheRecord>> mRecords;
};
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.29Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.