зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1312954
- Part 4: Add a new function in nsICacheEntry to allow its loadInfoContext to be fetched. r=mayhemer
This commit is contained in:
Родитель
a6d4f91ce5
Коммит
0764c9c895
|
@ -1552,6 +1552,18 @@ NS_IMETHODIMP CacheEntry::GetDiskStorageSizeInKB(uint32_t *aDiskStorageSize)
|
|||
return mFile->GetDiskStorageSizeInKB(aDiskStorageSize);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP CacheEntry::GetLoadContextInfo(nsILoadContextInfo** aInfo)
|
||||
{
|
||||
nsCOMPtr<nsILoadContextInfo> info = CacheFileUtils::ParseKey(mStorageID);
|
||||
if (!info) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
info.forget(aInfo);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsIRunnable
|
||||
|
||||
NS_IMETHODIMP CacheEntry::Run()
|
||||
|
|
|
@ -135,6 +135,10 @@ public:
|
|||
{
|
||||
return mOldInfo->GetDataSize(aDataSize);
|
||||
}
|
||||
NS_IMETHOD GetLoadContextInfo(nsILoadContextInfo** aInfo) override
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD AsyncDoom(nsICacheEntryDoomCallback* listener) override;
|
||||
NS_IMETHOD GetPersistent(bool *aPersistToDisk) override;
|
||||
|
|
|
@ -12,6 +12,7 @@ interface nsICacheEntryDoomCallback;
|
|||
interface nsICacheListener;
|
||||
interface nsIFile;
|
||||
interface nsICacheEntryMetaDataVisitor;
|
||||
interface nsILoadContextInfo;
|
||||
|
||||
[scriptable, uuid(607c2a2c-0a48-40b9-a956-8cf2bb9857cf)]
|
||||
interface nsICacheEntry : nsISupports
|
||||
|
@ -233,6 +234,11 @@ interface nsICacheEntry : nsISupports
|
|||
*/
|
||||
nsIInputStream openAlternativeInputStream(in ACString type);
|
||||
|
||||
/**
|
||||
* Get the nsILoadContextInfo of the cache entry
|
||||
*/
|
||||
readonly attribute nsILoadContextInfo loadContextInfo;
|
||||
|
||||
/****************************************************************************
|
||||
* The following methods might be added to some nsICacheEntryInternal
|
||||
* interface since we want to remove them as soon as the old cache backend is
|
||||
|
|
Загрузка…
Ссылка в новой задаче