Bug 913807 - HTTP cache v2: API+top service+integration+tests, off by default, r=michal+ehsan+mark.finkle+fabrice+mhammond+gavin
This commit is contained in:
16
netwerk/cache/nsApplicationCacheService.cpp
vendored
16
netwerk/cache/nsApplicationCacheService.cpp
vendored
@@ -9,6 +9,7 @@
|
||||
#include "nsCRT.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsILoadContextInfo.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@@ -28,7 +29,7 @@ nsApplicationCacheService::nsApplicationCacheService()
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsApplicationCacheService::BuildGroupID(nsIURI *aManifestURL,
|
||||
nsILoadContext *aLoadContext,
|
||||
nsILoadContextInfo *aLoadContextInfo,
|
||||
nsACString &_result)
|
||||
{
|
||||
nsresult rv;
|
||||
@@ -36,12 +37,9 @@ nsApplicationCacheService::BuildGroupID(nsIURI *aManifestURL,
|
||||
uint32_t appId = NECKO_NO_APP_ID;
|
||||
bool isInBrowserElement = false;
|
||||
|
||||
if (aLoadContext) {
|
||||
rv = aLoadContext->GetAppId(&appId);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = aLoadContext->GetIsInBrowserElement(&isInBrowserElement);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (aLoadContextInfo) {
|
||||
appId = aLoadContextInfo->AppId();
|
||||
isInBrowserElement = aLoadContextInfo->IsInBrowserElement();
|
||||
}
|
||||
|
||||
rv = nsOfflineCacheDevice::BuildApplicationCacheGroupID(
|
||||
@@ -134,7 +132,7 @@ nsApplicationCacheService::DeactivateGroup(const nsACString &group)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsApplicationCacheService::ChooseApplicationCache(const nsACString &key,
|
||||
nsILoadContext *aLoadContext,
|
||||
nsILoadContextInfo *aLoadContextInfo,
|
||||
nsIApplicationCache **out)
|
||||
{
|
||||
if (!mCacheService)
|
||||
@@ -144,7 +142,7 @@ nsApplicationCacheService::ChooseApplicationCache(const nsACString &key,
|
||||
nsresult rv = mCacheService->GetOfflineDevice(getter_AddRefs(device));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return device->ChooseApplicationCache(key, aLoadContext, out);
|
||||
return device->ChooseApplicationCache(key, aLoadContextInfo, out);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
||||
Reference in New Issue
Block a user