зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 1 - NullPrincipal, r=ckerschb
This commit is contained in:
Родитель
ae3569fae1
Коммит
a053cf1c15
|
@ -14,9 +14,9 @@
|
|||
|
||||
#include "ContentPrincipal.h"
|
||||
#include "ExpandedPrincipal.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIURIWithPrincipal.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsScriptSecurityManager.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ NullPrincipal::Create(const OriginAttributes& aOriginAttributes, nsIURI* aURI)
|
|||
/* static */ already_AddRefed<NullPrincipal>
|
||||
NullPrincipal::CreateWithoutOriginAttributes()
|
||||
{
|
||||
return NullPrincipal::Create(mozilla::OriginAttributes(), nullptr);
|
||||
return NullPrincipal::Create(OriginAttributes(), nullptr);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
* same-origin with anything but themselves.
|
||||
*/
|
||||
|
||||
#ifndef NullPrincipal_h
|
||||
#define NullPrincipal_h
|
||||
#ifndef mozilla_NullPrincipal_h
|
||||
#define mozilla_NullPrincipal_h
|
||||
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsJSPrincipals.h"
|
||||
|
@ -30,7 +30,9 @@ class nsIURI;
|
|||
|
||||
#define NS_NULLPRINCIPAL_SCHEME "moz-nullprincipal"
|
||||
|
||||
class NullPrincipal final : public mozilla::BasePrincipal
|
||||
namespace mozilla {
|
||||
|
||||
class NullPrincipal final : public BasePrincipal
|
||||
{
|
||||
public:
|
||||
// This should only be used by deserialization, and the factory constructor.
|
||||
|
@ -64,13 +66,13 @@ public:
|
|||
CreateWithInheritedAttributes(nsIDocShell* aDocShell, bool aIsFirstParty = false);
|
||||
|
||||
static already_AddRefed<NullPrincipal>
|
||||
Create(const mozilla::OriginAttributes& aOriginAttributes,
|
||||
Create(const OriginAttributes& aOriginAttributes,
|
||||
nsIURI* aURI = nullptr);
|
||||
|
||||
static already_AddRefed<NullPrincipal>
|
||||
CreateWithoutOriginAttributes();
|
||||
|
||||
nsresult Init(const mozilla::OriginAttributes& aOriginAttributes = mozilla::OriginAttributes(),
|
||||
nsresult Init(const OriginAttributes& aOriginAttributes = OriginAttributes(),
|
||||
nsIURI* aURI = nullptr);
|
||||
|
||||
virtual nsresult GetScriptLocation(nsACString &aStr) override;
|
||||
|
@ -91,7 +93,9 @@ private:
|
|||
// If aIsFirstParty is true, this NullPrincipal will be initialized base on
|
||||
// the aOriginAttributes with FirstPartyDomain set to an unique value, and this
|
||||
// value is generated from mURI.path, with ".mozilla" appending at the end.
|
||||
nsresult Init(const mozilla::OriginAttributes& aOriginAttributes, bool aIsFirstParty);
|
||||
nsresult Init(const OriginAttributes& aOriginAttributes, bool aIsFirstParty);
|
||||
};
|
||||
|
||||
#endif // NullPrincipal_h__
|
||||
} // mozilla namespace
|
||||
|
||||
#endif // mozilla_NullPrincipal_h
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include "nsCRT.h"
|
||||
#include "nsIUUIDGenerator.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//// NullPrincipalURI
|
||||
|
||||
|
@ -406,13 +408,13 @@ NullPrincipalURI::Deserialize(const mozilla::ipc::URIParams& aParams)
|
|||
//// nsISizeOf
|
||||
|
||||
size_t
|
||||
NullPrincipalURI::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
|
||||
NullPrincipalURI::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
return mPath.SizeOfExcludingThisIfUnshared(aMallocSizeOf);
|
||||
}
|
||||
|
||||
size_t
|
||||
NullPrincipalURI::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
|
||||
NullPrincipalURI::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
* This wraps nsSimpleURI so that all calls to it are done on the main thread.
|
||||
*/
|
||||
|
||||
#ifndef __NullPrincipalURI_h__
|
||||
#define __NullPrincipalURI_h__
|
||||
#ifndef mozilla_NullPrincipalURI_h
|
||||
#define mozilla_NullPrincipalURI_h
|
||||
|
||||
#include "nsIURI.h"
|
||||
#include "nsISizeOf.h"
|
||||
|
@ -27,8 +27,8 @@
|
|||
{0xb9, 0x1b, 0x6b, 0x54, 0x10, 0x22, 0x36, 0xe6} }
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class Encoding;
|
||||
}
|
||||
|
||||
class NullPrincipalURI final : public nsIURI
|
||||
, public nsISizeOf
|
||||
|
@ -40,8 +40,8 @@ public:
|
|||
NS_DECL_NSIIPCSERIALIZABLEURI
|
||||
|
||||
// nsISizeOf
|
||||
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
|
||||
|
||||
// Returns null on failure.
|
||||
static already_AddRefed<NullPrincipalURI> Create();
|
||||
|
@ -69,7 +69,7 @@ private:
|
|||
nsresult SetRef(const nsACString &input);
|
||||
nsresult SetFilePath(const nsACString &input);
|
||||
nsresult SetQuery(const nsACString &input);
|
||||
nsresult SetQueryWithEncoding(const nsACString &input, const mozilla::Encoding* encoding);
|
||||
nsresult SetQueryWithEncoding(const nsACString &input, const Encoding* encoding);
|
||||
bool Deserialize(const mozilla::ipc::URIParams&);
|
||||
|
||||
public:
|
||||
|
@ -110,4 +110,6 @@ public:
|
|||
friend class BaseURIMutator<NullPrincipalURI>;
|
||||
};
|
||||
|
||||
#endif // __NullPrincipalURI_h__
|
||||
} // mozilla namespace
|
||||
|
||||
#endif // mozilla_NullPrincipalURI_h
|
||||
|
|
|
@ -27,13 +27,13 @@ EXPORTS += [
|
|||
'ContentPrincipal.h',
|
||||
'nsJSPrincipals.h',
|
||||
'nsScriptSecurityManager.h',
|
||||
'NullPrincipal.h',
|
||||
'NullPrincipalURI.h',
|
||||
'SystemPrincipal.h',
|
||||
]
|
||||
|
||||
EXPORTS.mozilla = [
|
||||
'BasePrincipal.h',
|
||||
'NullPrincipal.h',
|
||||
'NullPrincipalURI.h',
|
||||
'OriginAttributes.h',
|
||||
]
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "mozilla/BasePrincipal.h"
|
||||
#include "ExpandedPrincipal.h"
|
||||
#include "SystemPrincipal.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "DomainPolicy.h"
|
||||
#include "nsString.h"
|
||||
#include "nsCRT.h"
|
||||
|
@ -59,6 +58,7 @@
|
|||
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include <stdint.h>
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
|
|
|
@ -199,8 +199,8 @@
|
|||
#include "nsXULAppAPI.h"
|
||||
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "Navigator.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "prenv.h"
|
||||
#include "URIUtils.h"
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#include "nsDOMJSUtils.h"
|
||||
#include "nsError.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "nsGlobalWindow.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "mozilla/dom/LocationBinding.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
|
|
|
@ -158,6 +158,7 @@
|
|||
#include "nsIMIMEService.h"
|
||||
#include "nsINode.h"
|
||||
#include "mozilla/dom/NodeInfo.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsIObjectLoadingContent.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIObserverService.h"
|
||||
|
@ -187,7 +188,6 @@
|
|||
#include "nsNetCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsNodeInfoManager.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsParserConstants.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
#include "nsIPermissionManager.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "ExpandedPrincipal.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "nsIXULWindow.h"
|
||||
#include "nsIMozBrowserFrame.h"
|
||||
#include "nsISHistory.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
#include "nsHTMLDocument.h"
|
||||
|
@ -76,6 +75,7 @@
|
|||
#include "mozilla/BasePrincipal.h"
|
||||
#include "mozilla/GuardObjects.h"
|
||||
#include "mozilla/HTMLEditor.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "mozilla/dom/ChromeMessageSender.h"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/dom/NodeInfo.h"
|
||||
#include "mozilla/dom/NodeInfoInlines.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsString.h"
|
||||
#include "nsAtom.h"
|
||||
|
@ -30,7 +31,6 @@
|
|||
#include "nsNameSpaceManager.h"
|
||||
#include "nsDocument.h"
|
||||
#include "nsWindowSizes.h"
|
||||
#include "NullPrincipal.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using mozilla::dom::NodeInfo;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "mozilla/dom/CSSRuleList.h"
|
||||
#include "mozilla/dom/DocumentFragment.h"
|
||||
#include "mozilla/dom/SRIMetadata.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsCSSPropertyID.h"
|
||||
#include "nsUnicharInputStream.h"
|
||||
#include "nsAttrName.h"
|
||||
|
@ -21,7 +22,6 @@
|
|||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIParserUtils.h"
|
||||
#include "nsIDocument.h"
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
#include "js/Class.h"
|
||||
|
||||
#include "nsJSPrincipals.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
#include "xpcprivate.h"
|
||||
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "ConsoleCommon.h"
|
||||
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
#include "js/Date.h"
|
||||
#include "js/StructuredClone.h"
|
||||
#include "KeyPath.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/EndianUtils.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/JSObjectHolder.h"
|
||||
#include "mozilla/Move.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/BackgroundHangMonitor.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/ProcessHangMonitorIPC.h"
|
||||
#include "mozilla/Unused.h"
|
||||
|
@ -85,7 +86,6 @@
|
|||
#include "mozilla/HangDetails.h"
|
||||
#include "imgLoader.h"
|
||||
#include "GMPServiceChild.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsIWorkerDebuggerManager.h"
|
||||
|
|
|
@ -95,10 +95,10 @@
|
|||
#include "ImageOps.h"
|
||||
#include "UnitTransforms.h"
|
||||
#include <algorithm>
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/WebBrowserPersistDocumentParent.h"
|
||||
#include "ProcessPriorityManager.h"
|
||||
#include "nsString.h"
|
||||
#include "NullPrincipal.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include "mozilla/plugins/PluginWidgetParent.h"
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "nsPIDOMWindow.h"
|
||||
#include "mozilla/EventStateManager.h"
|
||||
#include "mozilla/MozPromise.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/Types.h"
|
||||
#include "mozilla/PeerIdentity.h"
|
||||
|
@ -57,7 +58,6 @@
|
|||
#include "ThreadSafeRefcountingWithMainThreadDestruction.h"
|
||||
#include "Latency.h"
|
||||
#include "nsProxyRelease.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsVariant.h"
|
||||
|
||||
// For snprintf
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include "nsIWritablePropertyBag2.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsPluginStreamListenerPeer.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
@ -96,7 +97,6 @@
|
|||
#include "nsIImageLoadingContent.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsVersionComparator.h"
|
||||
#include "NullPrincipal.h"
|
||||
|
||||
#include "mozilla/dom/Promise.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "GeckoProfiler.h"
|
||||
#include "nsPluginInstanceOwner.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
|
||||
// nsPluginStreamListenerPeer
|
||||
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
#include "nsContentUtils.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsScriptSecurityManager.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
static const uint32_t kURIMaxLength = 64;
|
||||
|
||||
|
|
|
@ -16,15 +16,16 @@
|
|||
#include "nspr.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsJSPrincipals.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "js/Wrapper.h"
|
||||
#include "NullPrincipal.h"
|
||||
|
||||
extern mozilla::LazyLogModule MCD;
|
||||
using mozilla::AutoSafeJSContext;
|
||||
using mozilla::NullPrincipal;
|
||||
using mozilla::dom::AutoJSAPI;
|
||||
|
||||
//*****************************************************************************
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsStringStream.h"
|
||||
#include "nsStreamUtils.h"
|
||||
|
@ -25,6 +24,7 @@
|
|||
#include "mozilla/dom/FontTableURIProtocolHandler.h"
|
||||
#include "mozilla/dom/SVGDocument.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsSVGUtils.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "gfxFont.h"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsMimeTypes.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
@ -13,7 +14,6 @@
|
|||
#include "nsIStringStream.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "NullPrincipal.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsIconChannel,
|
||||
nsIRequest,
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/EndianUtils.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include <algorithm>
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
@ -25,7 +26,6 @@
|
|||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsIStringStream.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsIURL.h"
|
||||
#include "prlink.h"
|
||||
#include "gfxPlatform.h"
|
||||
|
@ -106,7 +106,8 @@ moz_gdk_pixbuf_to_channel(GdkPixbuf* aPixbuf, nsIURI* aURI,
|
|||
// nsIconProtocolHandler::NewChannel2 will provide the correct loadInfo for
|
||||
// this iconChannel. Use the most restrictive security settings for the
|
||||
// temporary loadInfo to make sure the channel can not be openend.
|
||||
nsCOMPtr<nsIPrincipal> nullPrincipal = NullPrincipal::CreateWithoutOriginAttributes();
|
||||
nsCOMPtr<nsIPrincipal> nullPrincipal =
|
||||
mozilla::NullPrincipal::CreateWithoutOriginAttributes();
|
||||
return NS_NewInputStreamChannel(aChannel,
|
||||
aURI,
|
||||
stream.forget(),
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
|
||||
#include "ImageLogging.h"
|
||||
#include "imgLoader.h"
|
||||
#include "NullPrincipal.h"
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/Move.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/ChaosMode.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "MainThreadUtils.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/ipc/PBackgroundSharedTypes.h"
|
||||
#include "mozilla/ipc/URIUtils.h"
|
||||
#include "mozilla/net/NeckoChannelParams.h"
|
||||
|
@ -18,7 +19,6 @@
|
|||
#include "nsNetUtil.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "ContentPrincipal.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/dom/BlobURL.h"
|
||||
#include "mozilla/NullPrincipalURI.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsID.h"
|
||||
#include "nsJARURI.h"
|
||||
#include "nsIIconURI.h"
|
||||
#include "NullPrincipalURI.h"
|
||||
#include "nsJSProtocolHandler.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsSimpleNestedURI.h"
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "nsIURI.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "ExpandedPrincipal.h"
|
||||
#include "WrapperFactory.h"
|
||||
#include "xpcprivate.h"
|
||||
|
@ -62,6 +61,7 @@
|
|||
#include "mozilla/dom/XMLSerializerBinding.h"
|
||||
#include "mozilla/dom/FormDataBinding.h"
|
||||
#include "mozilla/DeferredFinalize.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace JS;
|
||||
|
|
|
@ -102,7 +102,7 @@ using mozilla::dom::AudioChannelAgent;
|
|||
#include "ContentPrincipal.h"
|
||||
#include "ExpandedPrincipal.h"
|
||||
#include "SystemPrincipal.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsNetCID.h"
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
#include "nsHapticFeedback.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "mozilla/dom/MediaList.h"
|
||||
#include "mozilla/dom/ShadowRoot.h"
|
||||
#include "mozilla/dom/ShadowRootBinding.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/ServoBindings.h"
|
||||
#include "mozilla/ServoCSSRuleList.h"
|
||||
#include "mozilla/ServoStyleSet.h"
|
||||
|
@ -22,7 +23,6 @@
|
|||
#include "mozilla/StyleSheetInlines.h"
|
||||
|
||||
#include "mozAutoDocUpdate.h"
|
||||
#include "NullPrincipal.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include "mozilla/URLExtraData.h"
|
||||
|
||||
#include "mozilla/NullPrincipalURI.h"
|
||||
#include "nsProxyRelease.h"
|
||||
#include "NullPrincipalURI.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include "nsString.h"
|
||||
#include "ExampleStylesheet.h"
|
||||
#include "ServoBindings.h"
|
||||
#include "NullPrincipalURI.h"
|
||||
#include "mozilla/Encoding.h"
|
||||
#include "mozilla/NullPrincipalURI.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::css;
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
#include "nsDOMDataChannel.h"
|
||||
#include "mozilla/dom/Location.h"
|
||||
#include "mozilla/dom/Performance.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
@ -78,7 +79,6 @@
|
|||
#include "nsURLHelper.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIURLParser.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "js/GCAnnotations.h"
|
||||
#include "mozilla/PeerIdentity.h"
|
||||
#include "mozilla/dom/RTCCertificate.h"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "mozilla/dom/PerformanceStorage.h"
|
||||
#include "mozilla/dom/TabChild.h"
|
||||
#include "mozilla/dom/ToJSValue.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozIThirdPartyUtil.h"
|
||||
#include "nsFrameLoader.h"
|
||||
#include "nsIContentSecurityPolicy.h"
|
||||
|
@ -25,7 +26,6 @@
|
|||
#include "nsDocShell.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
#include "nsMixedContentBlocker.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsRedirectHistoryEntry.h"
|
||||
#include "LoadInfo.h"
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "prprf.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "prtime.h"
|
||||
|
||||
#include "nsIOService.h"
|
||||
|
@ -42,7 +43,6 @@
|
|||
#include "nsIURI.h"
|
||||
#include "nsIURIMutator.h"
|
||||
#include "nsILoadInfo.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsIAuthPrompt2.h"
|
||||
#include "nsIFTPChannelParentInternal.h"
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
* input stream provided by GVFS/GIO.
|
||||
*/
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIObserver.h"
|
||||
|
@ -25,7 +26,6 @@
|
|||
#include "nsIChannel.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIProtocolHandler.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/Monitor.h"
|
||||
#include "plstr.h"
|
||||
#include "prtime.h"
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "nsINetworkInterceptController.h"
|
||||
#include "mozilla/dom/Performance.h"
|
||||
#include "mozilla/dom/PerformanceStorage.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozIThirdPartyUtil.h"
|
||||
#include "nsStreamUtils.h"
|
||||
|
@ -51,7 +52,6 @@
|
|||
#include "nsILoadGroupChild.h"
|
||||
#include "mozilla/ConsoleReportCollector.h"
|
||||
#include "LoadInfo.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsISSLSocketControl.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "nsIURL.h"
|
||||
|
|
|
@ -38,11 +38,11 @@
|
|||
#include "nsIDOMWindowUtils.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsINetworkInterceptController.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsICorsPreflightCallback.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsHttpChannel.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsIHttpHeaderVisitor.h"
|
||||
#include "nsQueryObject.h"
|
||||
#include <algorithm>
|
||||
|
|
|
@ -95,7 +95,6 @@
|
|||
#include "nsIHttpPushListener.h"
|
||||
#include "nsIX509Cert.h"
|
||||
#include "ScopedNSSTypes.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsIDeprecationWarner.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsICompressConvStats.h"
|
||||
|
@ -104,6 +103,7 @@
|
|||
#include "mozilla/extensions/StreamFilterParent.h"
|
||||
#include "mozilla/net/Predictor.h"
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
#include "CacheControlParser.h"
|
||||
#include "nsMixedContentBlocker.h"
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
#include "nsContentUtils.h"
|
||||
#include "nsIHttpHeaderVisitor.h"
|
||||
#include "nsContentSecurityManager.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsIInputStreamChannel.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
|
||||
NS_IMPL_ADDREF(nsViewSourceChannel)
|
||||
NS_IMPL_RELEASE(nsViewSourceChannel)
|
||||
|
@ -67,7 +67,8 @@ nsViewSourceChannel::Init(nsIURI* uri)
|
|||
// Until then we follow the principal of least privilege and use
|
||||
// nullPrincipal as the loadingPrincipal and the least permissive
|
||||
// securityflag.
|
||||
nsCOMPtr<nsIPrincipal> nullPrincipal = NullPrincipal::CreateWithoutOriginAttributes();
|
||||
nsCOMPtr<nsIPrincipal> nullPrincipal =
|
||||
mozilla::NullPrincipal::CreateWithoutOriginAttributes();
|
||||
|
||||
rv = pService->NewChannel2(path,
|
||||
nullptr, // aOriginCharset
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsParserUtils.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/dom/DocumentFragment.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/ScriptLoader.h"
|
||||
|
@ -66,7 +66,8 @@ nsParserUtils::Sanitize(const nsAString& aFromStr,
|
|||
{
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
NS_NewURI(getter_AddRefs(uri), "about:blank");
|
||||
nsCOMPtr<nsIPrincipal> principal = NullPrincipal::CreateWithoutOriginAttributes();
|
||||
nsCOMPtr<nsIPrincipal> principal =
|
||||
mozilla::NullPrincipal::CreateWithoutOriginAttributes();
|
||||
nsCOMPtr<nsIDocument> document;
|
||||
nsresult rv = NS_NewDOMDocument(getter_AddRefs(document),
|
||||
EmptyString(),
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "nsUnicharInputStream.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
|
@ -680,7 +680,7 @@ nsExpatDriver::OpenInputStreamFromExternalDTD(const char16_t* aFPIStr,
|
|||
}
|
||||
}
|
||||
if (!loadingPrincipal) {
|
||||
loadingPrincipal = NullPrincipal::CreateWithoutOriginAttributes();
|
||||
loadingPrincipal = mozilla::NullPrincipal::CreateWithoutOriginAttributes();
|
||||
}
|
||||
rv = NS_NewChannel(getter_AddRefs(channel),
|
||||
uri,
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
#include "nsSAXXMLReader.h"
|
||||
|
||||
#include "mozilla/Encoding.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "nsIParser.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsStreamUtils.h"
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
#include "nsIClassInfoImpl.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsILoadInfo.h"
|
||||
#include "nsIContentPolicy.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "imgICache.h"
|
||||
|
||||
#define UNASSOCIATED_FAVICONS_LENGTH 32
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
#include "nsIMIMEInfo.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsWindowWatcher.h"
|
||||
#include "NullPrincipal.h"
|
||||
#include "mozilla/BrowserElementParent.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsDocShellLoadInfo.h"
|
||||
|
||||
#include "nsIScriptObjectPrincipal.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче