Bug 753990 - Allow appcache to work with a custom cache (profile) folder within a single application, r=michal.novotny
This commit is contained in:
13
netwerk/cache/nsDiskCacheDeviceSQL.cpp
vendored
13
netwerk/cache/nsDiskCacheDeviceSQL.cpp
vendored
@@ -629,6 +629,17 @@ nsApplicationCache::GetClientID(nsACString &out)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsApplicationCache::GetCacheDirectory(nsILocalFile **out)
|
||||
{
|
||||
if (mDevice->BaseDirectory())
|
||||
NS_ADDREF(*out = mDevice->BaseDirectory());
|
||||
else
|
||||
*out = nsnull;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsApplicationCache::GetActive(bool *out)
|
||||
{
|
||||
@@ -2361,6 +2372,8 @@ nsOfflineCacheDevice::SetCacheParentDirectory(nsILocalFile *parentDir)
|
||||
return;
|
||||
}
|
||||
|
||||
mBaseDirectory = parentDir;
|
||||
|
||||
// cache dir may not exist, but that's ok
|
||||
nsCOMPtr<nsIFile> dir;
|
||||
rv = parentDir->Clone(getter_AddRefs(dir));
|
||||
|
||||
Reference in New Issue
Block a user