Backed out changeset 35e4460b0194 (bug 1170837)

This commit is contained in:
Carsten "Tomcat" Book 2015-07-23 14:30:12 +02:00
Родитель c1bbed5a87
Коммит 00cdac9ed2
2 изменённых файлов: 0 добавлений и 38 удалений

Просмотреть файл

@ -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