Bug 1768189 - Part 20: Apply modernize-concat-nested-namespaces to dom/media/systemservices/CamerasParent.h ... r=andi
authorKagami Sascha Rosylight <krosylight@mozilla.com>
Mon, 09 May 2022 20:41:10 +0000
changeset 616742 4c52f09cdd8efb0329b8762b40fb1843d5a32c9f
parent 616741 9238a7890d2774b98a37ba93a744c950bb1330cd
child 616743 bbe4a6c1bcd8a548d1de61565b811057370729b8
push id39675
push userapavel@mozilla.com
push dateTue, 10 May 2022 09:55:38 +0000
treeherdermozilla-central@58a6343ab33d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersandi
bugs1768189
milestone102.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1768189 - Part 20: Apply modernize-concat-nested-namespaces to dom/media/systemservices/CamerasParent.h ... r=andi Depends on D145753 Differential Revision: https://phabricator.services.mozilla.com/D145754
dom/media/systemservices/CamerasParent.h
dom/media/systemservices/MediaParent.h
dom/media/systemservices/MediaSystemResourceManagerParent.h
dom/media/systemservices/MediaUtils.h
dom/media/systemservices/VideoEngine.h
dom/media/utils/MediaElementEventRunners.h
dom/media/webaudio/AnalyserNode.h
dom/media/webaudio/AudioBufferSourceNode.h
dom/media/webaudio/AudioDestinationNode.h
dom/media/webaudio/AudioListener.h
dom/media/webaudio/AudioParam.h
dom/media/webaudio/AudioParamDescriptorMap.h
dom/media/webaudio/AudioParamMap.h
dom/media/webaudio/AudioParamTimeline.h
dom/media/webaudio/AudioProcessingEvent.h
dom/media/webaudio/AudioScheduledSourceNode.h
dom/media/webaudio/AudioWorkletNode.h
dom/media/webaudio/BiquadFilterNode.h
dom/media/webaudio/ChannelMergerNode.h
dom/media/webaudio/ChannelSplitterNode.h
dom/media/webaudio/ConstantSourceNode.h
dom/media/webaudio/ConvolverNode.h
dom/media/webaudio/DelayNode.h
dom/media/webaudio/DynamicsCompressorNode.h
dom/media/webaudio/GainNode.h
--- a/dom/media/systemservices/CamerasParent.h
+++ b/dom/media/systemservices/CamerasParent.h
@@ -16,19 +16,17 @@
 #include "common_video/include/incoming_video_stream.h"
 #include "modules/video_capture/video_capture.h"
 #include "modules/video_capture/video_capture_defines.h"
 
 #include "CamerasChild.h"
 
 #include "base/thread.h"
 
-namespace mozilla {
-
-namespace camera {
+namespace mozilla::camera {
 
 class CamerasParent;
 
 class CallbackHelper : public rtc::VideoSinkInterface<webrtc::VideoFrame> {
  public:
   CallbackHelper(CaptureEngine aCapEng, uint32_t aStreamId,
                  CamerasParent* aParent)
       : mCapEngine(aCapEng), mStreamId(aStreamId), mParent(aParent){};
@@ -170,12 +168,11 @@ class CamerasParent final : public PCame
   Atomic<bool> mWebRTCAlive;
   RefPtr<InputObserver> mCameraObserver;
   std::map<nsCString, std::map<uint32_t, webrtc::VideoCaptureCapability>>
       mAllCandidateCapabilities;
 };
 
 PCamerasParent* CreateCamerasParent();
 
-}  // namespace camera
-}  // namespace mozilla
+}  // namespace mozilla::camera
 
 #endif  // mozilla_CameraParent_h
--- a/dom/media/systemservices/MediaParent.h
+++ b/dom/media/systemservices/MediaParent.h
@@ -6,18 +6,17 @@
 
 #ifndef mozilla_MediaParent_h
 #define mozilla_MediaParent_h
 
 #include "MediaChild.h"
 
 #include "mozilla/media/PMediaParent.h"
 
-namespace mozilla {
-namespace media {
+namespace mozilla::media {
 
 // media::Parent implements the chrome-process side of ipc for media::Child APIs
 // A same-process version may also be created to service non-e10s calls.
 
 class OriginKeyStore;
 
 class NonE10s {
   typedef mozilla::ipc::IProtocol::ActorDestroyReason ActorDestroyReason;
@@ -82,12 +81,11 @@ template <>
 inline mozilla::ipc::IPCResult IPCResult(Parent<NonE10s>* aSelf,
                                          bool aSuccess) {
   return IPC_OK();
 }
 
 PMediaParent* AllocPMediaParent();
 bool DeallocPMediaParent(PMediaParent* aActor);
 
-}  // namespace media
-}  // namespace mozilla
+}  // namespace mozilla::media
 
 #endif  // mozilla_MediaParent_h
--- a/dom/media/systemservices/MediaSystemResourceManagerParent.h
+++ b/dom/media/systemservices/MediaSystemResourceManagerParent.h
@@ -6,18 +6,17 @@
 #if !defined(MediaSystemResourceManagerParent_h_)
 #  define MediaSystemResourceManagerParent_h_
 
 #  include "MediaSystemResourceManager.h"
 #  include "MediaSystemResourceService.h"
 #  include "MediaSystemResourceTypes.h"
 #  include "mozilla/media/PMediaSystemResourceManagerParent.h"
 
-namespace mozilla {
-namespace media {
+namespace mozilla::media {
 
 /**
  * Handle MediaSystemResourceManager's IPC
  */
 class MediaSystemResourceManagerParent final
     : public PMediaSystemResourceManagerParent {
   friend class PMediaSystemResourceManagerParent;
 
@@ -50,12 +49,11 @@ class MediaSystemResourceManagerParent f
   bool mDestroyed;
 
   RefPtr<MediaSystemResourceService> mMediaSystemResourceService;
 
   nsClassHashtable<nsUint32HashKey, MediaSystemResourceRequest>
       mResourceRequests;
 };
 
-}  // namespace media
-}  // namespace mozilla
+}  // namespace mozilla::media
 
 #endif
--- a/dom/media/systemservices/MediaUtils.h
+++ b/dom/media/systemservices/MediaUtils.h
@@ -21,18 +21,17 @@
 #include "nsCOMPtr.h"
 #include "nsIAsyncShutdown.h"
 #include "nsISupportsImpl.h"
 #include "nsProxyRelease.h"
 #include "nsThreadUtils.h"
 
 class nsIEventTarget;
 
-namespace mozilla {
-namespace media {
+namespace mozilla::media {
 
 /* media::NewRunnableFrom() - Create a Runnable from a lambda.
  *
  * Passing variables (closures) to an async function is clunky with Runnable:
  *
  *   void Foo()
  *   {
  *     class FooRunnable : public Runnable
@@ -317,13 +316,11 @@ AwaitAll(already_AddRefed<nsIEventTarget
   RefPtr<nsIEventTarget> pool = aPool;
   RefPtr<TaskQueue> taskQueue =
       TaskQueue::Create(do_AddRef(pool), "MozPromiseAwaitAll");
   RefPtr<typename Promise::AllPromiseType> p =
       Promise::All(taskQueue, aPromises);
   return Await(pool.forget(), p);
 }
 
-}  // namespace media
-
-}  // namespace mozilla
+}  // namespace mozilla::media
 
 #endif  // mozilla_MediaUtils_h
--- a/dom/media/systemservices/VideoEngine.h
+++ b/dom/media/systemservices/VideoEngine.h
@@ -11,18 +11,17 @@
 #include "VideoFrameUtils.h"
 #include "mozilla/media/MediaUtils.h"
 #include "modules/video_capture/video_capture_impl.h"
 #include "modules/video_capture/video_capture_defines.h"
 #include "modules/video_capture/video_capture_factory.h"
 #include <memory>
 #include <functional>
 
-namespace mozilla {
-namespace camera {
+namespace mozilla::camera {
 
 // Historically the video engine was part of webrtc
 // it was removed (and reimplemented in Talk)
 class VideoEngine {
  private:
   virtual ~VideoEngine() = default;
 
   // Base cache expiration period
@@ -85,11 +84,10 @@ class VideoEngine {
   std::shared_ptr<webrtc::VideoCaptureModule::DeviceInfo> mDeviceInfo;
   UniquePtr<const webrtc::Config> mConfig;
   std::map<int32_t, CaptureEntry> mCaps;
   std::map<int32_t, int32_t> mIdMap;
   // The validity period for non-camera capture device infos`
   webrtc::Timestamp mExpiryTime = webrtc::Timestamp::Micros(0);
   int32_t GenerateId();
 };
-}  // namespace camera
-}  // namespace mozilla
+}  // namespace mozilla::camera
 #endif
--- a/dom/media/utils/MediaElementEventRunners.h
+++ b/dom/media/utils/MediaElementEventRunners.h
@@ -9,18 +9,17 @@
 #include "nsCycleCollectionParticipant.h"
 #include "nsIContent.h"
 #include "nsINamed.h"
 #include "nsIRunnable.h"
 #include "nsString.h"
 #include "nsISupportsImpl.h"
 #include "nsTString.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class HTMLMediaElement;
 
 // Under certain conditions there may be no-one holding references to
 // a media element from script, DOM parent, etc, but the element may still
 // fire meaningful events in the future so we can't destroy it yet:
 // 1) If the element is delaying the load event (or would be, if it were
 // in a document), then events up to loadeddata or error could be fired,
@@ -181,12 +180,11 @@ class nsTimeupdateRunner : public nsMedi
         mIsMandatory(aIsMandatory) {}
   NS_IMETHOD Run() override;
 
  private:
   bool ShouldDispatchTimeupdate() const;
   bool mIsMandatory;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif  // mozilla_media_mediaelementeventrunners_h
--- a/dom/media/webaudio/AnalyserNode.h
+++ b/dom/media/webaudio/AnalyserNode.h
@@ -6,18 +6,17 @@
 
 #ifndef AnalyserNode_h_
 #define AnalyserNode_h_
 
 #include "AudioNode.h"
 #include "FFTBlock.h"
 #include "AlignedTArray.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioContext;
 struct AnalyserOptions;
 
 class AnalyserNode final : public AudioNode {
  public:
   static already_AddRefed<AnalyserNode> Create(AudioContext& aAudioContext,
                                                const AnalyserOptions& aOptions,
@@ -73,12 +72,11 @@ class AnalyserNode final : public AudioN
   nsTArray<AudioChunk> mChunks;
   double mMinDecibels;
   double mMaxDecibels;
   double mSmoothingTimeConstant;
   size_t mCurrentChunk = 0;
   AlignedTArray<float> mOutputBuffer;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/AudioBufferSourceNode.h
+++ b/dom/media/webaudio/AudioBufferSourceNode.h
@@ -5,18 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef AudioBufferSourceNode_h_
 #define AudioBufferSourceNode_h_
 
 #include "AudioScheduledSourceNode.h"
 #include "AudioBuffer.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 struct AudioBufferSourceOptions;
 class AudioParam;
 
 class AudioBufferSourceNode final : public AudioScheduledSourceNode,
                                     public MainThreadMediaTrackListener {
  public:
   static already_AddRefed<AudioBufferSourceNode> Create(
@@ -120,12 +119,11 @@ class AudioBufferSourceNode final : publ
   RefPtr<AudioBuffer> mBuffer;
   RefPtr<AudioParam> mPlaybackRate;
   RefPtr<AudioParam> mDetune;
   bool mLoop;
   bool mStartCalled;
   bool mBufferSet;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/AudioDestinationNode.h
+++ b/dom/media/webaudio/AudioDestinationNode.h
@@ -7,18 +7,17 @@
 #ifndef AudioDestinationNode_h_
 #define AudioDestinationNode_h_
 
 #include "AudioChannelService.h"
 #include "AudioNode.h"
 #include "AudioChannelAgent.h"
 #include "mozilla/TimeStamp.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioContext;
 class WakeLock;
 
 class AudioDestinationNode final : public AudioNode,
                                    public nsIAudioChannelAgentCallback,
                                    public MainThreadMediaTrackListener {
  public:
@@ -124,12 +123,11 @@ class AudioDestinationNode final : publi
   bool mIsOffline;
 
   // These varaibles are used to know how long AudioContext would become audible
   // since it was created.
   TimeStamp mCreatedTime;
   TimeDuration mDurationBeforeFirstTimeAudible;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/AudioListener.h
+++ b/dom/media/webaudio/AudioListener.h
@@ -12,19 +12,17 @@
 #include "mozilla/Attributes.h"
 #include "ThreeDPoint.h"
 #include "AudioContext.h"
 #include "PannerNode.h"
 #include "WebAudioUtils.h"
 #include "js/TypeDecls.h"
 #include "mozilla/MemoryReporting.h"
 
-namespace mozilla {
-
-namespace dom {
+namespace mozilla::dom {
 
 class AudioListenerEngine final {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AudioListenerEngine)
 
   AudioListenerEngine();
 
   enum class AudioListenerParameter {
@@ -77,12 +75,11 @@ class AudioListener final : public nsWra
  private:
   RefPtr<AudioContext> mContext;
   RefPtr<AudioListenerEngine> mEngine;
   ThreeDPoint mPosition;
   ThreeDPoint mFrontVector;
   ThreeDPoint mRightVector;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/AudioParam.h
+++ b/dom/media/webaudio/AudioParam.h
@@ -10,19 +10,17 @@
 #include "AudioParamTimeline.h"
 #include "nsWrapperCache.h"
 #include "nsCycleCollectionParticipant.h"
 #include "AudioNode.h"
 #include "mozilla/dom/TypedArray.h"
 #include "WebAudioUtils.h"
 #include "js/TypeDecls.h"
 
-namespace mozilla {
-
-namespace dom {
+namespace mozilla::dom {
 
 class AudioParam final : public nsWrapperCache, public AudioParamTimeline {
   virtual ~AudioParam();
 
  public:
   AudioParam(AudioNode* aNode, uint32_t aIndex, const nsAString& aName,
              float aDefaultValue,
              float aMinValue = std::numeric_limits<float>::lowest(),
@@ -237,12 +235,11 @@ class AudioParam final : public nsWrappe
   // The input port used to connect the AudioParam's track to its node's track
   RefPtr<MediaInputPort> mNodeTrackPort;
   const uint32_t mIndex;
   const float mDefaultValue;
   const float mMinValue;
   const float mMaxValue;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/AudioParamDescriptorMap.h
+++ b/dom/media/webaudio/AudioParamDescriptorMap.h
@@ -5,20 +5,18 @@
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_AudioParamDescriptor_h
 #define mozilla_dom_AudioParamDescriptor_h
 
 #include "mozilla/dom/AudioParamDescriptorBinding.h"
 #include "nsTArray.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 // Note: we call this "map" to match the spec, but we store audio param
 // descriptors in an array, because we need ordered access, and don't need the
 // map functionalities.
 typedef nsTArray<AudioParamDescriptor> AudioParamDescriptorMap;
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif  // mozilla_dom_AudioParamDescriptor_h
--- a/dom/media/webaudio/AudioParamMap.h
+++ b/dom/media/webaudio/AudioParamMap.h
@@ -5,18 +5,17 @@
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 #ifndef AudioParamMap_h_
 #define AudioParamMap_h_
 
 #include "nsWrapperCache.h"
 #include "AudioWorkletNode.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioParamMap final : public nsWrapperCache {
  public:
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AudioParamMap)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AudioParamMap)
 
   explicit AudioParamMap(AudioWorkletNode* aParent);
 
@@ -25,12 +24,11 @@ class AudioParamMap final : public nsWra
   JSObject* WrapObject(JSContext* aCx,
                        JS::Handle<JSObject*> aGivenProto) override;
 
  private:
   ~AudioParamMap() = default;
   RefPtr<AudioWorkletNode> mParent;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif  // AudioParamMap_h_
--- a/dom/media/webaudio/AudioParamTimeline.h
+++ b/dom/media/webaudio/AudioParamTimeline.h
@@ -6,19 +6,17 @@
 
 #ifndef AudioParamTimeline_h_
 #define AudioParamTimeline_h_
 
 #include "AudioEventTimeline.h"
 #include "AudioNodeTrack.h"
 #include "AudioSegment.h"
 
-namespace mozilla {
-
-namespace dom {
+namespace mozilla::dom {
 
 // This helper class is used to represent the part of the AudioParam
 // class that gets sent to AudioNodeEngine instances.  In addition to
 // AudioEventTimeline methods, it holds a pointer to an optional
 // AudioNodeTrack which represents the AudioNode inputs to the AudioParam.
 // This AudioNodeTrack is managed by the AudioParam subclass on the main
 // thread, and can only be obtained from the AudioNodeEngine instances
 // consuming this class.
@@ -132,12 +130,11 @@ inline void AudioParamTimeline::GetValue
     uint32_t blockOffset = aTime % WEBAUDIO_BLOCK_SIZE;
     MOZ_ASSERT(blockOffset + aSize <= WEBAUDIO_BLOCK_SIZE);
     for (size_t i = 0; i < aSize; ++i) {
       aBuffer[i] += AudioNodeInputValue(blockOffset + i);
     }
   }
 }
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/AudioProcessingEvent.h
+++ b/dom/media/webaudio/AudioProcessingEvent.h
@@ -6,18 +6,17 @@
 
 #ifndef AudioProcessingEvent_h_
 #define AudioProcessingEvent_h_
 
 #include "AudioBuffer.h"
 #include "ScriptProcessorNode.h"
 #include "mozilla/dom/Event.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioProcessingEvent final : public Event {
  public:
   AudioProcessingEvent(ScriptProcessorNode* aOwner, nsPresContext* aPresContext,
                        WidgetEvent* aEvent);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioProcessingEvent, Event)
@@ -62,12 +61,11 @@ class AudioProcessingEvent final : publi
  private:
   double mPlaybackTime;
   RefPtr<AudioBuffer> mInputBuffer;
   RefPtr<AudioBuffer> mOutputBuffer;
   RefPtr<ScriptProcessorNode> mNode;
   uint32_t mNumberOfInputChannels;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/AudioScheduledSourceNode.h
+++ b/dom/media/webaudio/AudioScheduledSourceNode.h
@@ -5,18 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef AudioScheduledSourceNode_h_
 #define AudioScheduledSourceNode_h_
 
 #include "AudioNode.h"
 #include "mozilla/dom/AudioScheduledSourceNodeBinding.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioContext;
 
 class AudioScheduledSourceNode : public AudioNode {
  public:
   virtual void Start(double aWhen, ErrorResult& aRv) = 0;
   virtual void Stop(double aWhen, ErrorResult& aRv) = 0;
 
@@ -24,12 +23,11 @@ class AudioScheduledSourceNode : public 
 
  protected:
   AudioScheduledSourceNode(AudioContext* aContext, uint32_t aChannelCount,
                            ChannelCountMode aChannelCountMode,
                            ChannelInterpretation aChannelInterpretation);
   virtual ~AudioScheduledSourceNode() = default;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/AudioWorkletNode.h
+++ b/dom/media/webaudio/AudioWorkletNode.h
@@ -4,18 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 #ifndef AudioWorkletNode_h_
 #define AudioWorkletNode_h_
 
 #include "AudioNode.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioParamMap;
 struct AudioWorkletNodeOptions;
 class MessagePort;
 struct NamedAudioParamTimeline;
 struct ProcessorErrorDetails;
 template <typename KeyType, typename ValueType>
 class Record;
@@ -59,12 +58,11 @@ class AudioWorkletNode : public AudioNod
 
   nsString mNodeName;
   RefPtr<MessagePort> mPort;
   RefPtr<AudioParamMap> mParameters;
   uint16_t mInputCount;
   uint16_t mOutputCount;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif  // AudioWorkletNode_h_
--- a/dom/media/webaudio/BiquadFilterNode.h
+++ b/dom/media/webaudio/BiquadFilterNode.h
@@ -6,18 +6,17 @@
 
 #ifndef BiquadFilterNode_h_
 #define BiquadFilterNode_h_
 
 #include "AudioNode.h"
 #include "AudioParam.h"
 #include "mozilla/dom/BiquadFilterNodeBinding.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioContext;
 struct BiquadFilterOptions;
 
 class BiquadFilterNode final : public AudioNode {
  public:
   static already_AddRefed<BiquadFilterNode> Create(
       AudioContext& aAudioContext, const BiquadFilterOptions& aOptions,
@@ -62,12 +61,11 @@ class BiquadFilterNode final : public Au
 
   BiquadFilterType mType;
   RefPtr<AudioParam> mFrequency;
   RefPtr<AudioParam> mDetune;
   RefPtr<AudioParam> mQ;
   RefPtr<AudioParam> mGain;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/ChannelMergerNode.h
+++ b/dom/media/webaudio/ChannelMergerNode.h
@@ -4,18 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef ChannelMergerNode_h_
 #define ChannelMergerNode_h_
 
 #include "AudioNode.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioContext;
 struct ChannelMergerOptions;
 
 class ChannelMergerNode final : public AudioNode {
  public:
   static already_AddRefed<ChannelMergerNode> Create(
       AudioContext& aAudioContext, const ChannelMergerOptions& aOptions,
@@ -58,12 +57,11 @@ class ChannelMergerNode final : public A
 
  private:
   ChannelMergerNode(AudioContext* aContext, uint16_t aInputCount);
   ~ChannelMergerNode() = default;
 
   const uint16_t mInputCount;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/ChannelSplitterNode.h
+++ b/dom/media/webaudio/ChannelSplitterNode.h
@@ -4,18 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef ChannelSplitterNode_h_
 #define ChannelSplitterNode_h_
 
 #include "AudioNode.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioContext;
 struct ChannelSplitterOptions;
 
 class ChannelSplitterNode final : public AudioNode {
  public:
   static already_AddRefed<ChannelSplitterNode> Create(
       AudioContext& aAudioContext, const ChannelSplitterOptions& aOptions,
@@ -63,12 +62,11 @@ class ChannelSplitterNode final : public
 
  private:
   ChannelSplitterNode(AudioContext* aContext, uint16_t aOutputCount);
   ~ChannelSplitterNode() = default;
 
   const uint16_t mOutputCount;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/ConstantSourceNode.h
+++ b/dom/media/webaudio/ConstantSourceNode.h
@@ -6,18 +6,17 @@
 
 #ifndef ConstantSourceNode_h_
 #define ConstantSourceNode_h_
 
 #include "AudioScheduledSourceNode.h"
 #include "AudioParam.h"
 #include "mozilla/dom/ConstantSourceNodeBinding.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioContext;
 
 class ConstantSourceNode final : public AudioScheduledSourceNode,
                                  public MainThreadMediaTrackListener {
  public:
   explicit ConstantSourceNode(AudioContext* aContext);
 
@@ -51,12 +50,11 @@ class ConstantSourceNode final : public 
  protected:
   virtual ~ConstantSourceNode();
 
  private:
   RefPtr<AudioParam> mOffset;
   bool mStartCalled;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/ConvolverNode.h
+++ b/dom/media/webaudio/ConvolverNode.h
@@ -6,18 +6,17 @@
 
 #ifndef ConvolverNode_h_
 #define ConvolverNode_h_
 
 #include "AudioNode.h"
 #include "AudioBuffer.h"
 #include "nsPrintfCString.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioContext;
 struct ConvolverOptions;
 
 class ConvolverNode final : public AudioNode {
  public:
   static already_AddRefed<ConvolverNode> Create(
       JSContext* aCx, AudioContext& aAudioContext,
@@ -68,12 +67,11 @@ class ConvolverNode final : public Audio
  private:
   explicit ConvolverNode(AudioContext* aContext);
   ~ConvolverNode() = default;
 
   RefPtr<AudioBuffer> mBuffer;
   bool mNormalize;
 };
 
-}  // end namespace dom
-}  // end namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/DelayNode.h
+++ b/dom/media/webaudio/DelayNode.h
@@ -5,18 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef DelayNode_h_
 #define DelayNode_h_
 
 #include "AudioNode.h"
 #include "AudioParam.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioContext;
 struct DelayOptions;
 
 class DelayNode final : public AudioNode {
  public:
   static already_AddRefed<DelayNode> Create(AudioContext& aAudioContext,
                                             const DelayOptions& aOptions,
@@ -46,12 +45,11 @@ class DelayNode final : public AudioNode
   DelayNode(AudioContext* aContext, double aMaxDelay);
   ~DelayNode() = default;
 
   friend class DelayNodeEngine;
 
   RefPtr<AudioParam> mDelay;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/DynamicsCompressorNode.h
+++ b/dom/media/webaudio/DynamicsCompressorNode.h
@@ -5,18 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef DynamicsCompressorNode_h_
 #define DynamicsCompressorNode_h_
 
 #include "AudioNode.h"
 #include "AudioParam.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioContext;
 struct DynamicsCompressorOptions;
 
 class DynamicsCompressorNode final : public AudioNode {
  public:
   static already_AddRefed<DynamicsCompressorNode> Create(
       AudioContext& aAudioContext, const DynamicsCompressorOptions& aOptions,
@@ -82,12 +81,11 @@ class DynamicsCompressorNode final : pub
   RefPtr<AudioParam> mThreshold;
   RefPtr<AudioParam> mKnee;
   RefPtr<AudioParam> mRatio;
   float mReduction;
   RefPtr<AudioParam> mAttack;
   RefPtr<AudioParam> mRelease;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/webaudio/GainNode.h
+++ b/dom/media/webaudio/GainNode.h
@@ -5,18 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GainNode_h_
 #define GainNode_h_
 
 #include "AudioNode.h"
 #include "AudioParam.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class AudioContext;
 struct GainOptions;
 
 class GainNode final : public AudioNode {
  public:
   static already_AddRefed<GainNode> Create(AudioContext& aAudioContext,
                                            const GainOptions& aOptions,
@@ -44,12 +43,11 @@ class GainNode final : public AudioNode 
 
  private:
   explicit GainNode(AudioContext* aContext);
   ~GainNode() = default;
 
   RefPtr<AudioParam> mGain;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif