Bug 1310366 - Remove support for app redirects; r=baku

This commit is contained in:
Ehsan Akhgari
2016-10-14 19:29:35 -04:00
parent eb0c059bf1
commit 7c5681d557
6 changed files with 0 additions and 57 deletions

View File

@@ -1253,10 +1253,6 @@ nsDocShell::LoadURI(nsIURI* aURI,
return NS_OK; // JS may not handle returning of an error code
}
if (DoAppRedirectIfNeeded(aURI, aLoadInfo, aFirstParty)) {
return NS_OK;
}
nsCOMPtr<nsIURI> referrer;
nsCOMPtr<nsIURI> originalURI;
bool loadReplace = false;
@@ -6729,32 +6725,6 @@ nsDocShell::ForceRefreshURIFromTimer(nsIURI* aURI,
return ForceRefreshURI(aURI, aDelay, aMetaRefresh);
}
bool
nsDocShell::DoAppRedirectIfNeeded(nsIURI* aURI,
nsIDocShellLoadInfo* aLoadInfo,
bool aFirstParty)
{
uint32_t appId = nsIDocShell::GetAppId();
if (appId != nsIScriptSecurityManager::NO_APP_ID &&
appId != nsIScriptSecurityManager::UNKNOWN_APP_ID) {
nsCOMPtr<nsIAppsService> appsService =
do_GetService(APPS_SERVICE_CONTRACTID);
NS_ASSERTION(appsService, "No AppsService available");
nsCOMPtr<nsIURI> redirect;
nsresult rv = appsService->GetRedirect(appId, aURI, getter_AddRefs(redirect));
if (NS_SUCCEEDED(rv) && redirect) {
rv = LoadURI(redirect, aLoadInfo, nsIWebNavigation::LOAD_FLAGS_NONE,
aFirstParty);
if (NS_SUCCEEDED(rv)) {
return true;
}
}
}
return false;
}
NS_IMETHODIMP
nsDocShell::ForceRefreshURI(nsIURI* aURI, int32_t aDelay, bool aMetaRefresh)
{
@@ -7460,10 +7430,6 @@ nsDocShell::OnRedirectStateChange(nsIChannel* aOldChannel,
return;
}
if (DoAppRedirectIfNeeded(newURI, nullptr, false)) {
return;
}
// Below a URI visit is saved (see AddURIVisit method doc).
// The visit chain looks something like:
// ...