зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 35e4460b0194 (bug 1170837)
This commit is contained in:
Родитель
c1bbed5a87
Коммит
00cdac9ed2
|
@ -518,41 +518,6 @@ PackagedAppService::~PackagedAppService()
|
|||
gPackagedAppService = nullptr;
|
||||
}
|
||||
|
||||
/* static */ nsresult
|
||||
PackagedAppService::GetPackageURI(nsIURI *aURI, nsIURI **aPackageURI)
|
||||
{
|
||||
nsCOMPtr<nsIURL> url = do_QueryInterface(aURI);
|
||||
if (!url) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
nsAutoCString path;
|
||||
nsresult rv = url->GetFilePath(path);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
int32_t pos = path.Find(PACKAGED_APP_TOKEN);
|
||||
if (pos == kNotFound) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> packageURI;
|
||||
rv = aURI->CloneIgnoringRef(getter_AddRefs(packageURI));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
rv = packageURI->SetPath(Substring(path, 0, pos));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
packageURI.forget(aPackageURI);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PackagedAppService::RequestURI(nsIURI *aURI,
|
||||
nsILoadContextInfo *aInfo,
|
||||
|
|
|
@ -61,9 +61,6 @@ private:
|
|||
// Should be called on the main thread.
|
||||
nsresult NotifyPackageDownloaded(nsCString aKey);
|
||||
|
||||
// Extract the URI of a package from the given packaged resource URI.
|
||||
static nsresult GetPackageURI(nsIURI *aUri, nsIURI **aPackageURI);
|
||||
|
||||
// This class is used to write data into the cache entry corresponding to the
|
||||
// packaged resource being downloaded.
|
||||
// The PackagedAppDownloader will hold a ref to a CacheEntryWriter that
|
||||
|
|
Загрузка…
Ссылка в новой задаче