Bug 1375244 - Remove sync KeywordToURI and related IPC messages as they are no longer required. r=Gijs,mak,mccr8

Differential Revision: https://phabricator.services.mozilla.com/D89486
This commit is contained in:
Mark Banner
2020-09-11 07:15:21 +00:00
parent 320632ed8f
commit 4ab5dd90a6
6 changed files with 2 additions and 168 deletions

View File

@@ -5749,32 +5749,7 @@ already_AddRefed<nsIURIFixupInfo> nsDocShell::KeywordToURI(
const nsACString& aKeyword, bool aIsPrivateContext,
nsIInputStream** aPostData) {
nsCOMPtr<nsIURIFixupInfo> info;
if (XRE_IsContentProcess()) {
dom::ContentChild* contentChild = dom::ContentChild::GetSingleton();
if (!contentChild) {
return nullptr;
}
info = do_CreateInstance("@mozilla.org/docshell/uri-fixup-info;1");
if (NS_WARN_IF(!info)) {
return nullptr;
}
RefPtr<nsIInputStream> postData;
RefPtr<nsIURI> uri;
nsAutoString providerName;
nsAutoCString keyword(aKeyword);
// TODO (Bug 1375244): This synchronous IPC messaging should be changed.
if (contentChild->SendKeywordToURI(keyword, aIsPrivateContext,
&providerName, &postData, &uri)) {
NS_ConvertUTF8toUTF16 keywordW(aKeyword);
info->SetKeywordAsSent(keywordW);
info->SetKeywordProviderName(providerName);
if (aPostData) {
postData.forget(aPostData);
}
info->SetPreferredURI(uri);
}
} else {
if (!XRE_IsContentProcess()) {
nsCOMPtr<nsIURIFixup> uriFixup = components::URIFixup::Service();
if (uriFixup) {
uriFixup->KeywordToURI(aKeyword, aIsPrivateContext, aPostData,
@@ -12703,14 +12678,6 @@ void nsDocShell::MaybeNotifyKeywordSearchLoading(const nsString& aProvider,
return;
}
if (XRE_IsContentProcess()) {
dom::ContentChild* contentChild = dom::ContentChild::GetSingleton();
if (contentChild) {
contentChild->SendNotifyKeywordSearchLoading(aProvider, aKeyword);
}
return;
}
nsCOMPtr<nsISearchService> searchSvc =
do_GetService("@mozilla.org/browser/search-service;1");
if (searchSvc) {