diff --git a/dom/reporting/ReportingHeader.cpp b/dom/reporting/ReportingHeader.cpp index d22cc3d4eca2..66a7c93e1e63 100644 --- a/dom/reporting/ReportingHeader.cpp +++ b/dom/reporting/ReportingHeader.cpp @@ -32,8 +32,7 @@ #define REPORTING_PURGE_ALL "reporting:purge-all" #define REPORTING_PURGE_HOST "reporting:purge-host" -namespace mozilla { -namespace dom { +namespace mozilla::dom { namespace { @@ -777,5 +776,4 @@ NS_INTERFACE_MAP_END NS_IMPL_ADDREF(ReportingHeader) NS_IMPL_RELEASE(ReportingHeader) -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom diff --git a/dom/reporting/ReportingObserver.cpp b/dom/reporting/ReportingObserver.cpp index 43a8acc01037..a9ab0bfd46bd 100644 --- a/dom/reporting/ReportingObserver.cpp +++ b/dom/reporting/ReportingObserver.cpp @@ -11,8 +11,7 @@ #include "nsIGlobalObject.h" #include "nsThreadUtils.h" -namespace mozilla { -namespace dom { +namespace mozilla::dom { NS_IMPL_CYCLE_COLLECTION_CLASS(ReportingObserver) NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ReportingObserver) @@ -154,5 +153,4 @@ void ReportingObserver::MaybeNotify() { void ReportingObserver::ForgetReports() { mReports.Clear(); } -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom diff --git a/dom/reporting/ReportingUtils.cpp b/dom/reporting/ReportingUtils.cpp index 497606ccd93f..ce7966a0a343 100644 --- a/dom/reporting/ReportingUtils.cpp +++ b/dom/reporting/ReportingUtils.cpp @@ -14,8 +14,7 @@ #include "nsAtom.h" #include "nsIGlobalObject.h" -namespace mozilla { -namespace dom { +namespace mozilla::dom { /* static */ void ReportingUtils::Report(nsIGlobalObject* aGlobal, nsAtom* aType, @@ -43,5 +42,4 @@ void ReportingUtils::Report(nsIGlobalObject* aGlobal, nsAtom* aType, ReportDeliver::Record(window, type, aGroupName, aURL, aBody); } -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom diff --git a/dom/reporting/ReportingUtils.h b/dom/reporting/ReportingUtils.h index 8ea06715e6fa..ee9726bed733 100644 --- a/dom/reporting/ReportingUtils.h +++ b/dom/reporting/ReportingUtils.h @@ -12,8 +12,7 @@ class nsAtom; class nsIGlobalObject; -namespace mozilla { -namespace dom { +namespace mozilla::dom { class ReportBody; @@ -24,7 +23,6 @@ class ReportingUtils final { ReportBody* aBody); }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_ReportingUtils_h diff --git a/dom/reporting/TestingDeprecatedInterface.cpp b/dom/reporting/TestingDeprecatedInterface.cpp index 9a8d65be196c..9c03f3125dae 100644 --- a/dom/reporting/TestingDeprecatedInterface.cpp +++ b/dom/reporting/TestingDeprecatedInterface.cpp @@ -8,8 +8,7 @@ #include "mozilla/dom/BindingDeclarations.h" #include "mozilla/dom/ReportingBinding.h" -namespace mozilla { -namespace dom { +namespace mozilla::dom { NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(TestingDeprecatedInterface, mGlobal) @@ -46,5 +45,4 @@ void TestingDeprecatedInterface::DeprecatedMethod() const {} bool TestingDeprecatedInterface::DeprecatedAttribute() const { return true; } -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom diff --git a/dom/reporting/TestingDeprecatedInterface.h b/dom/reporting/TestingDeprecatedInterface.h index 224063fbf512..016da79fa478 100644 --- a/dom/reporting/TestingDeprecatedInterface.h +++ b/dom/reporting/TestingDeprecatedInterface.h @@ -17,8 +17,7 @@ class nsIGlobalObject; -namespace mozilla { -namespace dom { +namespace mozilla::dom { class GlobalObject; class TestingDeprecatedInterface final : public nsISupports, @@ -46,7 +45,6 @@ class TestingDeprecatedInterface final : public nsISupports, nsCOMPtr mGlobal; }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_TestingDeprecatedInterface_h diff --git a/dom/script/ModuleLoader.h b/dom/script/ModuleLoader.h index d4a3a25c824d..ff37a3199921 100644 --- a/dom/script/ModuleLoader.h +++ b/dom/script/ModuleLoader.h @@ -25,8 +25,7 @@ class ModuleLoadRequest; } // namespace loader } // namespace JS -namespace mozilla { -namespace dom { +namespace mozilla::dom { class ScriptLoader; class SRIMetadata; @@ -85,7 +84,6 @@ class ModuleLoader final : public JS::loader::ModuleLoaderBase { const Kind mKind; }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_ModuleLoader_h diff --git a/dom/script/ScriptDecoding.h b/dom/script/ScriptDecoding.h index f39818537428..ea4c4aeef3a9 100644 --- a/dom/script/ScriptDecoding.h +++ b/dom/script/ScriptDecoding.h @@ -19,8 +19,7 @@ #include // uint8_t, uint32_t #include // std::is_same -namespace mozilla { -namespace dom { +namespace mozilla::dom { template struct ScriptDecoding { @@ -84,7 +83,6 @@ struct ScriptDecoding { } }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_ScriptDecoding_h diff --git a/dom/script/ScriptElement.h b/dom/script/ScriptElement.h index 6f0e69f7bd3f..241ae67eb425 100644 --- a/dom/script/ScriptElement.h +++ b/dom/script/ScriptElement.h @@ -12,8 +12,7 @@ #include "nsIScriptElement.h" #include "nsStubMutationObserver.h" -namespace mozilla { -namespace dom { +namespace mozilla::dom { /** * Baseclass useful for script elements (such as and @@ -48,7 +47,6 @@ class ScriptElement : public nsIScriptElement, public nsStubMutationObserver { virtual bool MaybeProcessScript() override; }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_ScriptElement_h diff --git a/dom/script/ScriptLoadContext.cpp b/dom/script/ScriptLoadContext.cpp index aa759caad78f..c4ceaf6060f4 100644 --- a/dom/script/ScriptLoadContext.cpp +++ b/dom/script/ScriptLoadContext.cpp @@ -24,8 +24,7 @@ #include "nsIClassOfService.h" #include "nsISupportsPriority.h" -namespace mozilla { -namespace dom { +namespace mozilla::dom { ////////////////////////////////////////////////////////////// // ScriptLoadContext @@ -227,5 +226,4 @@ void ScriptLoadContext::GetProfilerLabel(nsACString& aOutString) { } } -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom diff --git a/dom/script/ScriptLoadContext.h b/dom/script/ScriptLoadContext.h index 683d82f475c4..108295d9671d 100644 --- a/dom/script/ScriptLoadContext.h +++ b/dom/script/ScriptLoadContext.h @@ -35,8 +35,7 @@ namespace JS { class OffThreadToken; } // namespace JS -namespace mozilla { -namespace dom { +namespace mozilla::dom { class Element; @@ -192,7 +191,6 @@ class ScriptLoadContext : public JS::loader::LoadContextBase, nsresult mUnreportedPreloadError; }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_ScriptLoadContext_h diff --git a/dom/script/ScriptLoadHandler.cpp b/dom/script/ScriptLoadHandler.cpp index 452f619a1d1f..d27298f96275 100644 --- a/dom/script/ScriptLoadHandler.cpp +++ b/dom/script/ScriptLoadHandler.cpp @@ -39,8 +39,7 @@ #include "nsString.h" #include "nsTArray.h" -namespace mozilla { -namespace dom { +namespace mozilla::dom { #undef LOG #define LOG(args) \ @@ -428,5 +427,4 @@ ScriptLoadHandler::OnStreamComplete(nsIIncrementalStreamLoader* aLoader, #undef LOG_ENABLED #undef LOG -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom diff --git a/dom/security/CSPEvalChecker.h b/dom/security/CSPEvalChecker.h index 912b70c62bcc..c2a1f8d774a8 100644 --- a/dom/security/CSPEvalChecker.h +++ b/dom/security/CSPEvalChecker.h @@ -12,8 +12,7 @@ struct JSContext; class nsGlobalWindowInner; -namespace mozilla { -namespace dom { +namespace mozilla::dom { class WorkerPrivate; @@ -28,7 +27,6 @@ class CSPEvalChecker final { bool* aAllowEval); }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_CSPEvalChecker_h diff --git a/dom/security/FramingChecker.h b/dom/security/FramingChecker.h index 5935c22da97d..17f0bef82f04 100644 --- a/dom/security/FramingChecker.h +++ b/dom/security/FramingChecker.h @@ -16,11 +16,9 @@ class nsIDocShellTreeItem; class nsIURI; class nsIContentSecurityPolicy; -namespace mozilla { -namespace dom { +namespace mozilla::dom { class BrowsingContext; -} -} // namespace mozilla +} // namespace mozilla::dom class FramingChecker { public: diff --git a/dom/security/ReferrerInfo.cpp b/dom/security/ReferrerInfo.cpp index 103f7cddd428..3b25121a66d1 100644 --- a/dom/security/ReferrerInfo.cpp +++ b/dom/security/ReferrerInfo.cpp @@ -37,8 +37,7 @@ static mozilla::LazyLogModule gReferrerInfoLog("ReferrerInfo"); using namespace mozilla::net; -namespace mozilla { -namespace dom { +namespace mozilla::dom { // Implementation of ClassInfo is required to serialize/deserialize NS_IMPL_CLASSINFO(ReferrerInfo, nullptr, nsIClassInfo::MAIN_THREAD_ONLY, @@ -1587,5 +1586,4 @@ void ReferrerInfo::RecordTelemetry(nsIHttpChannel* aChannel) { static_cast(mPolicy) + telemetryOffset); } -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom diff --git a/dom/security/ReferrerInfo.h b/dom/security/ReferrerInfo.h index 9bdc4029773e..c9a0415bbbed 100644 --- a/dom/security/ReferrerInfo.h +++ b/dom/security/ReferrerInfo.h @@ -42,8 +42,7 @@ class nsHttpChannel; using mozilla::Maybe; -namespace mozilla { -namespace dom { +namespace mozilla::dom { /** * The ReferrerInfo class holds the raw referrer and potentially a referrer @@ -471,7 +470,6 @@ class ReferrerInfo : public nsIReferrerInfo { #endif // DEBUG }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_ReferrerInfo_h diff --git a/dom/security/SRICheck.cpp b/dom/security/SRICheck.cpp index d397c60af164..79e8b9429afb 100644 --- a/dom/security/SRICheck.cpp +++ b/dom/security/SRICheck.cpp @@ -28,8 +28,7 @@ #define SRIERROR(args) \ MOZ_LOG(SRILogHelper::GetSriLog(), mozilla::LogLevel::Error, args) -namespace mozilla { -namespace dom { +namespace mozilla::dom { /** * Returns whether or not the sub-resource about to be loaded is eligible @@ -491,5 +490,4 @@ nsresult SRICheckDataVerifier::ExportEmptyDataSummary(uint32_t aDataLen, return NS_OK; } -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom diff --git a/dom/security/SRICheck.h b/dom/security/SRICheck.h index 90d26a689226..dca0fde633c9 100644 --- a/dom/security/SRICheck.h +++ b/dom/security/SRICheck.h @@ -15,8 +15,7 @@ class nsIChannel; class nsIConsoleReportCollector; -namespace mozilla { -namespace dom { +namespace mozilla::dom { class SRIMetadata; @@ -101,7 +100,6 @@ class SRICheckDataVerifier final { nsIConsoleReportCollector* aReporter); }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_SRICheck_h diff --git a/dom/security/SRILogHelper.h b/dom/security/SRILogHelper.h index 073a8e801a12..e453f3084275 100644 --- a/dom/security/SRILogHelper.h +++ b/dom/security/SRILogHelper.h @@ -9,8 +9,7 @@ #include "mozilla/Logging.h" -namespace mozilla { -namespace dom { +namespace mozilla::dom { class SRILogHelper final { public: @@ -20,7 +19,6 @@ class SRILogHelper final { } }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_SRILogHelper_h diff --git a/dom/security/SRIMetadata.cpp b/dom/security/SRIMetadata.cpp index 0f585c4483e2..39097e0de49c 100644 --- a/dom/security/SRIMetadata.cpp +++ b/dom/security/SRIMetadata.cpp @@ -20,8 +20,7 @@ static mozilla::LogModule* GetSriMetadataLog() { #define SRIMETADATAERROR(args) \ MOZ_LOG(GetSriMetadataLog(), mozilla::LogLevel::Error, args) -namespace mozilla { -namespace dom { +namespace mozilla::dom { SRIMetadata::SRIMetadata(const nsACString& aToken) : mAlgorithmType(SRIMetadata::UNKNOWN_ALGORITHM), mEmpty(false) { @@ -186,5 +185,4 @@ bool SRIMetadata::CanTrustBeDelegatedTo(const SRIMetadata& aOther) const { return true; } -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom diff --git a/dom/security/SRIMetadata.h b/dom/security/SRIMetadata.h index 37c05ed7b339..a38e92403970 100644 --- a/dom/security/SRIMetadata.h +++ b/dom/security/SRIMetadata.h @@ -11,8 +11,7 @@ #include "nsString.h" #include "SRICheck.h" -namespace mozilla { -namespace dom { +namespace mozilla::dom { class SRIMetadata final { friend class SRICheck; @@ -86,7 +85,6 @@ class SRIMetadata final { bool mEmpty; }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_SRIMetadata_h diff --git a/dom/security/SecFetch.h b/dom/security/SecFetch.h index 9ebec60de532..b4b1495f4dfe 100644 --- a/dom/security/SecFetch.h +++ b/dom/security/SecFetch.h @@ -9,8 +9,7 @@ class nsIHttpChannel; -namespace mozilla { -namespace dom { +namespace mozilla::dom { class SecFetch final { public: @@ -23,7 +22,6 @@ class SecFetch final { static void AddSecFetchUser(nsIHttpChannel* aHTTPChannel); }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_SecFetch_h diff --git a/dom/security/featurepolicy/Feature.cpp b/dom/security/featurepolicy/Feature.cpp index 1b9a19862c6c..92a92369da41 100644 --- a/dom/security/featurepolicy/Feature.cpp +++ b/dom/security/featurepolicy/Feature.cpp @@ -7,8 +7,7 @@ #include "Feature.h" #include "mozilla/BasePrincipal.h" -namespace mozilla { -namespace dom { +namespace mozilla::dom { void Feature::GetAllowList(nsTArray>& aList) const { MOZ_ASSERT(mPolicy == eAllowList); @@ -74,5 +73,4 @@ bool Feature::AllowListContains(nsIPrincipal* aPrincipal) const { bool Feature::HasAllowList() const { return mPolicy == eAllowList; } -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom diff --git a/dom/security/featurepolicy/Feature.h b/dom/security/featurepolicy/Feature.h index f85b3addcdf4..e8a3d89c81b6 100644 --- a/dom/security/featurepolicy/Feature.h +++ b/dom/security/featurepolicy/Feature.h @@ -13,8 +13,7 @@ class nsIPrincipal; -namespace mozilla { -namespace dom { +namespace mozilla::dom { class Feature final { public: @@ -61,7 +60,6 @@ class Feature final { CopyableTArray> mAllowList; }; -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #endif // mozilla_dom_Feature_h diff --git a/dom/security/featurepolicy/FeaturePolicy.cpp b/dom/security/featurepolicy/FeaturePolicy.cpp index 07b6e9fba3fd..cb5c1ea44a3c 100644 --- a/dom/security/featurepolicy/FeaturePolicy.cpp +++ b/dom/security/featurepolicy/FeaturePolicy.cpp @@ -14,8 +14,7 @@ #include "nsContentUtils.h" #include "nsNetUtil.h" -namespace mozilla { -namespace dom { +namespace mozilla::dom { NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(FeaturePolicy) NS_IMPL_CYCLE_COLLECTING_ADDREF(FeaturePolicy) @@ -332,5 +331,4 @@ void FeaturePolicy::MaybeSetAllowedPolicy(const nsAString& aFeatureName) { mAttributeEnabledFeatureNames.AppendElement(aFeatureName); } -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom