mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 589613 - [SeaMonkey 2.1, mochitest-browser-chrome] browser_Services.js | Services.search exists
r=gavin a=NPOTB
This commit is contained in:
parent
2785d60565
commit
1a7c1b888b
@ -48,6 +48,9 @@ LIBRARY_NAME = basedocshell_s
|
||||
GRE_MODULE = 1
|
||||
LIBXUL_LIBRARY = 1
|
||||
|
||||
ifdef MOZ_TOOLKIT_SEARCH
|
||||
DEFINES += -DMOZ_TOOLKIT_SEARCH
|
||||
endif
|
||||
|
||||
SDK_XPIDLSRCS = \
|
||||
nsIGlobalHistory.idl \
|
||||
|
@ -48,7 +48,10 @@
|
||||
#include "nsIPrefLocalizedString.h"
|
||||
#include "nsIPlatformCharset.h"
|
||||
#include "nsILocalFile.h"
|
||||
|
||||
#ifdef MOZ_TOOLKIT_SEARCH
|
||||
#include "nsIBrowserSearchService.h"
|
||||
#endif
|
||||
|
||||
#include "nsIURIFixup.h"
|
||||
#include "nsDefaultURIFixup.h"
|
||||
@ -399,6 +402,7 @@ NS_IMETHODIMP nsDefaultURIFixup::KeywordToURI(const nsACString& aKeyword,
|
||||
return NS_NewURI(aURI, spec);
|
||||
}
|
||||
|
||||
#ifdef MOZ_TOOLKIT_SEARCH
|
||||
// Try falling back to the search service's default search engine
|
||||
nsCOMPtr<nsIBrowserSearchService> searchSvc = do_GetService("@mozilla.org/browser/search-service;1");
|
||||
if (searchSvc) {
|
||||
@ -436,6 +440,7 @@ NS_IMETHODIMP nsDefaultURIFixup::KeywordToURI(const nsACString& aKeyword,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// out of options
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
@ -141,9 +141,12 @@ XPIDLSRCS = \
|
||||
nsIURIWithPrincipal.idl \
|
||||
nsIURIClassifier.idl \
|
||||
nsIRedirectResultListener.idl \
|
||||
nsIBrowserSearchService.idl \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_TOOLKIT_SEARCH
|
||||
XPIDLSRCS += nsIBrowserSearchService.idl
|
||||
endif
|
||||
|
||||
EXPORTS = \
|
||||
netCore.h \
|
||||
nsNetError.h \
|
||||
|
Loading…
Reference in New Issue
Block a user