diff --git a/uriloader/exthandler/HandlerServiceParent.cpp b/uriloader/exthandler/HandlerServiceParent.cpp index 6eefb48f1316..ab77657dd5f3 100644 --- a/uriloader/exthandler/HandlerServiceParent.cpp +++ b/uriloader/exthandler/HandlerServiceParent.cpp @@ -9,8 +9,14 @@ #include "HandlerServiceParent.h" #include "nsIHandlerService.h" #include "nsIMIMEInfo.h" +#include "nsIMIMEService.h" #include "ContentHandlerService.h" +#include "nsIExternalProtocolService.h" #include "nsStringEnumerator.h" +#include "nsIMutableArray.h" +#include "nsCExternalHandlerService.h" +#include "nsComponentManagerUtils.h" +#include "nsServiceManagerUtils.h" #ifdef MOZ_WIDGET_GTK # include "unix/nsGNOMERegistry.h" #endif diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build index 0575fd95a5b5..0fb126a7f3f7 100644 --- a/uriloader/exthandler/moz.build +++ b/uriloader/exthandler/moz.build @@ -142,5 +142,3 @@ if CONFIG["MOZ_ENABLE_DBUS"]: if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] - -REQUIRES_UNIFIED_BUILD = True diff --git a/uriloader/exthandler/nsExternalProtocolHandler.cpp b/uriloader/exthandler/nsExternalProtocolHandler.cpp index b7e9b3203702..4e93977b8f39 100644 --- a/uriloader/exthandler/nsExternalProtocolHandler.cpp +++ b/uriloader/exthandler/nsExternalProtocolHandler.cpp @@ -16,6 +16,7 @@ #include "nsServiceManagerUtils.h" #include "nsIInterfaceRequestor.h" #include "nsIInterfaceRequestorUtils.h" +#include "nsIRedirectHistoryEntry.h" #include "nsNetUtil.h" #include "nsContentSecurityManager.h" #include "nsExternalHelperAppService.h" diff --git a/uriloader/exthandler/nsLocalHandlerApp.cpp b/uriloader/exthandler/nsLocalHandlerApp.cpp index f1a9a779cf7d..6212d2aeb441 100644 --- a/uriloader/exthandler/nsLocalHandlerApp.cpp +++ b/uriloader/exthandler/nsLocalHandlerApp.cpp @@ -7,6 +7,7 @@ #include "nsLocalHandlerApp.h" #include "nsIURI.h" #include "nsIProcess.h" +#include "nsComponentManagerUtils.h" // XXX why does nsMIMEInfoImpl have a threadsafe nsISupports? do we need one // here too? diff --git a/uriloader/exthandler/nsMIMEInfoImpl.cpp b/uriloader/exthandler/nsMIMEInfoImpl.cpp index a37235f6b1f5..3616ab7fcf3b 100644 --- a/uriloader/exthandler/nsMIMEInfoImpl.cpp +++ b/uriloader/exthandler/nsMIMEInfoImpl.cpp @@ -11,15 +11,20 @@ #include "nsIFile.h" #include "nsIFileURL.h" #include "nsEscape.h" +#include "nsComponentManagerUtils.h" #include "nsCURILoader.h" #include "nsCExternalHandlerService.h" #include "nsIExternalProtocolService.h" #include "nsIObserverService.h" +#include "nsISupportsPrimitives.h" +#include "mozilla/ClearOnShutdown.h" +#include "mozilla/Services.h" #include "mozilla/StaticPtr.h" +#include "mozilla/StaticPrefs_browser.h" #include "xpcpublic.h" static bool sInitializedOurData = false; -StaticRefPtr sOurAppFile; +mozilla::StaticRefPtr sOurAppFile; /* static */ already_AddRefed nsMIMEInfoBase::GetCanonicalExecutable( @@ -80,14 +85,14 @@ nsMIMEInfoBase::nsMIMEInfoBase(const char* aMIMEType) : mSchemeOrType(aMIMEType), mClass(eMIMEInfo), mAlwaysAskBeforeHandling( - StaticPrefs:: + mozilla::StaticPrefs:: browser_download_always_ask_before_handling_new_types()) {} nsMIMEInfoBase::nsMIMEInfoBase(const nsACString& aMIMEType) : mSchemeOrType(aMIMEType), mClass(eMIMEInfo), mAlwaysAskBeforeHandling( - StaticPrefs:: + mozilla::StaticPrefs:: browser_download_always_ask_before_handling_new_types()) {} // Constructor for a handler that lets the caller specify whether this is a @@ -99,7 +104,7 @@ nsMIMEInfoBase::nsMIMEInfoBase(const nsACString& aType, HandlerClass aClass) : mSchemeOrType(aType), mClass(aClass), mAlwaysAskBeforeHandling( - StaticPrefs:: + mozilla::StaticPrefs:: browser_download_always_ask_before_handling_new_types() || aClass != eMIMEInfo) {} @@ -352,7 +357,8 @@ bool nsMIMEInfoBase::AutomationOnlyCheckIfLaunchStubbed(nsIFile* aFile) { } NS_IMETHODIMP -nsMIMEInfoBase::LaunchWithURI(nsIURI* aURI, BrowsingContext* aBrowsingContext) { +nsMIMEInfoBase::LaunchWithURI(nsIURI* aURI, + mozilla::dom::BrowsingContext* aBrowsingContext) { // This is only being called with protocol handlers NS_ASSERTION(mClass == eProtocolInfo, "nsMIMEInfoBase should be a protocol handler"); diff --git a/uriloader/exthandler/win/nsMIMEInfoWin.cpp b/uriloader/exthandler/win/nsMIMEInfoWin.cpp index 37cf22f0c493..758b2018a7cd 100644 --- a/uriloader/exthandler/win/nsMIMEInfoWin.cpp +++ b/uriloader/exthandler/win/nsMIMEInfoWin.cpp @@ -5,9 +5,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsArrayEnumerator.h" +#include "nsComponentManagerUtils.h" #include "nsCOMArray.h" #include "nsLocalFile.h" #include "nsMIMEInfoWin.h" +#include "nsIMIMEService.h" #include "nsNetUtil.h" #include #include @@ -98,7 +100,8 @@ nsMIMEInfoWin::LaunchWithFile(nsIFile* aFile) { if (mPreferredAction == useSystemDefault) { nsCOMPtr defaultApp = GetDefaultApplication(); - if (defaultApp && StaticPrefs::browser_pdf_launchDefaultEdgeAsApp()) { + if (defaultApp && + mozilla::StaticPrefs::browser_pdf_launchDefaultEdgeAsApp()) { // Since Edgium is the default handler for PDF and other kinds of files, // if we're using the OS default and it's Edgium prefer its app mode so it // operates as a viewer (without browser toolbars). Bug 1632277. @@ -295,7 +298,8 @@ nsresult nsMIMEInfoWin::LoadUriInternal(nsIURI* aURL) { // Ask the shell/urlmon to parse |utf16Spec| to avoid malformed URLs. // Failure is indicative of a potential security issue so we should // bail out if so. - LauncherResult<_bstr_t> validatedUri = UrlmonValidateUri(utf16Spec.get()); + mozilla::LauncherResult<_bstr_t> validatedUri = + mozilla::UrlmonValidateUri(utf16Spec.get()); if (validatedUri.isErr()) { return NS_ERROR_FAILURE; }