Bug 1768189 - Part 26: Apply modernize-concat-nested-namespaces to dom/reporting/ReportingHeader.cpp ... r=andi

Depends on D145759

Differential Revision: https://phabricator.services.mozilla.com/D145760
This commit is contained in:
Kagami Sascha Rosylight 2022-05-09 20:41:13 +00:00
parent b432cc0606
commit 544bfe11bc
25 changed files with 50 additions and 100 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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<nsIGlobalObject> mGlobal;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // mozilla_dom_TestingDeprecatedInterface_h

View File

@ -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

View File

@ -19,8 +19,7 @@
#include <stdint.h> // uint8_t, uint32_t
#include <type_traits> // std::is_same
namespace mozilla {
namespace dom {
namespace mozilla::dom {
template <typename Unit>
struct ScriptDecoding {
@ -84,7 +83,6 @@ struct ScriptDecoding<Utf8Unit> {
}
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // mozilla_dom_ScriptDecoding_h

View File

@ -12,8 +12,7 @@
#include "nsIScriptElement.h"
#include "nsStubMutationObserver.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/**
* Baseclass useful for script elements (such as <xhtml:script> 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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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<uint32_t>(mPolicy) + telemetryOffset);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -7,8 +7,7 @@
#include "Feature.h"
#include "mozilla/BasePrincipal.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
void Feature::GetAllowList(nsTArray<nsCOMPtr<nsIPrincipal>>& 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

View File

@ -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<nsCOMPtr<nsIPrincipal>> mAllowList;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // mozilla_dom_Feature_h

View File

@ -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