Bug 1768189 - Part 18: Apply modernize-concat-nested-namespaces to dom/media/PrincipalChangeObserver.h ... r=media-playback-reviewers,bryce
authorKagami Sascha Rosylight <krosylight@mozilla.com>
Mon, 09 May 2022 20:41:10 +0000
changeset 616740 4109e0f2fd105389c6cbf1730e594b2bb34caad9
parent 616739 e42b0d51d289c9c9517f995b1a61e12a4d4e0351
child 616741 9238a7890d2774b98a37ba93a744c950bb1330cd
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)
reviewersmedia-playback-reviewers, bryce
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 18: Apply modernize-concat-nested-namespaces to dom/media/PrincipalChangeObserver.h ... r=media-playback-reviewers,bryce Depends on D145751 Differential Revision: https://phabricator.services.mozilla.com/D145752
dom/media/PrincipalChangeObserver.h
dom/media/TimeUnits.h
dom/media/VideoPlaybackQuality.h
dom/media/VideoTrack.h
dom/media/VideoTrackList.h
dom/media/autoplay/AutoplayPolicy.h
dom/media/autoplay/GVAutoplayPermissionRequest.h
dom/media/eme/DetailedPromise.h
dom/media/eme/MediaEncryptedEvent.h
dom/media/eme/MediaKeyError.h
dom/media/eme/MediaKeySystemAccessManager.h
dom/media/eme/MediaKeySystemAccessPermissionRequest.h
dom/media/fake-cdm/cdm-test-output-protection.h
dom/media/gmp/ChromiumCDMChild.h
dom/media/gmp/GMPContentChild.h
dom/media/gmp/GMPContentParent.h
dom/media/gmp/GMPLoader.h
dom/media/gmp/GMPParent.h
dom/media/gmp/GMPPlatform.h
dom/media/gmp/GMPProcessChild.h
dom/media/gmp/GMPProcessParent.h
dom/media/gmp/GMPServiceChild.h
dom/media/gmp/GMPSharedMemManager.h
dom/media/gmp/GMPStorage.h
dom/media/gmp/GMPStorageChild.h
--- a/dom/media/PrincipalChangeObserver.h
+++ b/dom/media/PrincipalChangeObserver.h
@@ -2,28 +2,26 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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 MOZILLA_PRINCIPALCHANGEOBSERVER_H_
 #define MOZILLA_PRINCIPALCHANGEOBSERVER_H_
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 /**
  * A PrincipalChangeObserver for any type, but originating from DOMMediaStream,
  * then expanded to MediaStreamTrack.
  *
  * Used to learn about dynamic changes to an object's principal.
  * Operations relating to these observers must be confined to the main thread.
  */
 template <typename T>
 class PrincipalChangeObserver {
  public:
   virtual void PrincipalChanged(T* aArg) = 0;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif /* MOZILLA_PRINCIPALCHANGEOBSERVER_H_ */
--- a/dom/media/TimeUnits.h
+++ b/dom/media/TimeUnits.h
@@ -11,21 +11,19 @@
 
 #include "Intervals.h"
 #include "mozilla/CheckedInt.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/IntegerPrintfMacros.h"
 
-namespace mozilla {
-namespace media {
+namespace mozilla::media {
 class TimeIntervals;
-}  // namespace media
-}  // namespace mozilla
+}  // namespace mozilla::media
 // CopyChooser specialization for nsTArray
 template <>
 struct nsTArray_RelocationStrategy<mozilla::media::TimeIntervals> {
   typedef nsTArray_RelocateUsingMoveConstructor<mozilla::media::TimeIntervals>
       Type;
 };
 
 namespace mozilla {
--- a/dom/media/VideoPlaybackQuality.h
+++ b/dom/media/VideoPlaybackQuality.h
@@ -7,18 +7,17 @@
 #ifndef mozilla_dom_VideoPlaybackQuality_h_
 #define mozilla_dom_VideoPlaybackQuality_h_
 
 #include "mozilla/dom/HTMLMediaElement.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDOMNavigationTiming.h"
 #include "nsWrapperCache.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class VideoPlaybackQuality final : public nsWrapperCache {
  public:
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(VideoPlaybackQuality)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(VideoPlaybackQuality)
 
   VideoPlaybackQuality(HTMLMediaElement* aElement,
                        DOMHighResTimeStamp aCreationTime, uint32_t aTotalFrames,
@@ -39,12 +38,11 @@ class VideoPlaybackQuality final : publi
   ~VideoPlaybackQuality() = default;
 
   RefPtr<HTMLMediaElement> mElement;
   DOMHighResTimeStamp mCreationTime;
   uint32_t mTotalFrames;
   uint32_t mDroppedFrames;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif  // mozilla_dom_VideoPlaybackQuality_h_
--- a/dom/media/VideoTrack.h
+++ b/dom/media/VideoTrack.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 mozilla_dom_VideoTrack_h
 #define mozilla_dom_VideoTrack_h
 
 #include "MediaTrack.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class VideoTrackList;
 class VideoStreamTrack;
 
 class VideoTrack : public MediaTrack {
  public:
   VideoTrack(nsIGlobalObject* aOwnerGlobal, const nsAString& aId,
              const nsAString& aKind, const nsAString& aLabel,
@@ -52,12 +51,11 @@ class VideoTrack : public MediaTrack {
 
  private:
   virtual ~VideoTrack();
 
   bool mSelected;
   RefPtr<VideoStreamTrack> mVideoStreamTrack;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif  // mozilla_dom_VideoTrack_h
--- a/dom/media/VideoTrackList.h
+++ b/dom/media/VideoTrackList.h
@@ -5,18 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_VideoTrackList_h
 #define mozilla_dom_VideoTrackList_h
 
 #include "MediaTrack.h"
 #include "MediaTrackList.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class VideoTrack;
 
 class VideoTrackList : public MediaTrackList {
  public:
   VideoTrackList(nsIGlobalObject* aOwnerObject, HTMLMediaElement* aMediaElement)
       : MediaTrackList(aOwnerObject, aMediaElement), mSelectedIndex(-1) {}
 
@@ -42,12 +41,11 @@ class VideoTrackList : public MediaTrack
 
  protected:
   VideoTrackList* AsVideoTrackList() override { return this; }
 
  private:
   int32_t mSelectedIndex;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif  // mozilla_dom_VideoTrackList_h
--- a/dom/media/autoplay/AutoplayPolicy.h
+++ b/dom/media/autoplay/AutoplayPolicy.h
@@ -6,18 +6,17 @@
 
 #if !defined(AutoplayPolicy_h_)
 #  define AutoplayPolicy_h_
 
 #  include "mozilla/NotNull.h"
 
 class nsIPrincipal;
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class HTMLMediaElement;
 class AudioContext;
 class Document;
 enum class DocumentAutoplayPolicy : uint8_t;
 
 /**
  * AutoplayPolicy is used to manage autoplay logic for all kinds of media,
@@ -58,12 +57,11 @@ class AutoplayPolicyTelemetryUtils {
   // if block autoplay was enabled. If this returns false, it means we would
   // either block or ask for permission.
   // Note: this is for telemetry purposes, and doesn't check the prefs
   // which enable/disable block autoplay. Do not use for blocking logic!
   static bool WouldBeAllowedToPlayIfAutoplayDisabled(
       const AudioContext& aContext);
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/autoplay/GVAutoplayPermissionRequest.h
+++ b/dom/media/autoplay/GVAutoplayPermissionRequest.h
@@ -5,18 +5,17 @@
 #ifndef DOM_MEDIA_GVAUTOPLAYPERMISSIONREQUEST_H_
 #define DOM_MEDIA_GVAUTOPLAYPERMISSIONREQUEST_H_
 
 #include "GVAutoplayRequestUtils.h"
 #include "nsContentPermissionHelper.h"
 
 class nsGlobalWindowInner;
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 /**
  * This class is used to provide an ability for GeckoView (GV) to allow its
  * embedder (application) to decide whether the autoplay media should be allowed
  * or denied on the page. We have two types of request, one for audible media,
  * another one for inaudible media. Each page would at most have one request per
  * type at a time, and the result of request would be effective on that page
  * until the page gets reloaded or closed.
@@ -77,12 +76,11 @@ class GVAutoplayPermissionRequestor fina
  private:
   static bool HasEverAskForRequest(BrowsingContext* aContext,
                                    GVAutoplayRequestType aType);
   static void CreateAsyncRequest(nsPIDOMWindowInner* aWindow,
                                  BrowsingContext* aContext,
                                  GVAutoplayRequestType aType);
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/eme/DetailedPromise.h
+++ b/dom/media/eme/DetailedPromise.h
@@ -6,18 +6,17 @@
 
 #ifndef __DetailedPromise_h__
 #define __DetailedPromise_h__
 
 #include "mozilla/dom/Promise.h"
 #include "mozilla/Telemetry.h"
 #include "EMEUtils.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 /*
  * This is pretty horrible; bug 1160445.
  * Extend Promise to add custom DOMException messages on rejection.
  * Get rid of this once we've ironed out EME errors in the wild.
  */
 class DetailedPromise : public Promise {
  public:
@@ -95,12 +94,11 @@ class DetailedPromise : public Promise {
 
   nsCString mName;
   bool mResponded;
   TimeStamp mStartTime;
   Optional<Telemetry::HistogramID> mSuccessLatencyProbe;
   Optional<Telemetry::HistogramID> mFailureLatencyProbe;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif  // __DetailedPromise_h__
--- a/dom/media/eme/MediaEncryptedEvent.h
+++ b/dom/media/eme/MediaEncryptedEvent.h
@@ -12,18 +12,17 @@
 #include "mozilla/AlreadyAddRefed.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/dom/Event.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsISupports.h"
 #include "nsStringFwd.h"
 #include "nsTArray.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 struct MediaKeyNeededEventInit;
 
 class MediaEncryptedEvent final : public Event {
  public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(MediaEncryptedEvent,
                                                          Event)
  protected:
@@ -51,12 +50,11 @@ class MediaEncryptedEvent final : public
 
   void GetInitData(JSContext* cx, JS::MutableHandle<JSObject*> aData,
                    ErrorResult& aRv);
 
  private:
   nsTArray<uint8_t> mRawInitData;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif  // mozilla_dom_MediaKeyNeededEvent_h__
--- a/dom/media/eme/MediaKeyError.h
+++ b/dom/media/eme/MediaKeyError.h
@@ -7,29 +7,27 @@
 #ifndef mozilla_dom_MediaKeyError_h
 #define mozilla_dom_MediaKeyError_h
 
 #include "mozilla/Attributes.h"
 #include "nsWrapperCache.h"
 #include "mozilla/dom/Event.h"
 #include "js/TypeDecls.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class MediaKeyError final : public Event {
  public:
   MediaKeyError(EventTarget* aOwner, uint32_t aSystemCode);
   ~MediaKeyError();
 
   JSObject* WrapObjectInternal(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
   uint32_t SystemCode() const;
 
  private:
   uint32_t mSystemCode;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif
--- a/dom/media/eme/MediaKeySystemAccessManager.h
+++ b/dom/media/eme/MediaKeySystemAccessManager.h
@@ -7,18 +7,17 @@
 
 #include "mozilla/dom/MediaKeySystemAccess.h"
 #include "mozilla/MozPromise.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsIObserver.h"
 #include "nsISupportsImpl.h"
 #include "nsITimer.h"
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 class DetailedPromise;
 class TestGMPVideoDecoder;
 
 /**
  * MediaKeySystemAccessManager implements the functionality for
  * Navigator.requestMediaKeySystemAccess(). The navigator may perform its own
  * logic before passing the request to this class, but the majority of
@@ -220,12 +219,11 @@ class MediaKeySystemAccessManager final 
   // Note the type in the holder should match
   // MediaKeySystemAccessPermissionRequest::RequestPromise, but we can't
   // include MediaKeySystemAccessPermissionRequest's header here without
   // breaking the build, so we do this hack.
   MozPromiseRequestHolder<MozPromise<bool, bool, true>>
       mAppAllowsProtectedMediaPromiseRequest;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif  // DOM_MEDIA_MEDIAKEYSYSTEMACCESSMANAGER_H_
--- a/dom/media/eme/MediaKeySystemAccessPermissionRequest.h
+++ b/dom/media/eme/MediaKeySystemAccessPermissionRequest.h
@@ -7,18 +7,17 @@
 #ifndef DOM_MEDIA_EME_MEDIAKEYSYSTEMACCESSPERMISSIONREQUEST_H_
 #define DOM_MEDIA_EME_MEDIAKEYSYSTEMACCESSPERMISSIONREQUEST_H_
 
 #include "mozilla/MozPromise.h"
 #include "nsContentPermissionHelper.h"
 
 class nsGlobalWindowInner;
 
-namespace mozilla {
-namespace dom {
+namespace mozilla::dom {
 
 /**
  * This class encapsulates a permission request to allow media key system
  * access. The intention is not for this class to be used in all cases of EME,
  * but only when we need to seek explicit approval from an application using
  * Gecko, such as an application embedding via GeckoView.
  *
  * media.eme.require-app-approval should be used to gate this functionality in
@@ -65,12 +64,11 @@ class MediaKeySystemAccessPermissionRequ
 
  private:
   explicit MediaKeySystemAccessPermissionRequest(nsGlobalWindowInner* aWindow);
   ~MediaKeySystemAccessPermissionRequest();
 
   MozPromiseHolder<RequestPromise> mPromiseHolder;
 };
 
-}  // namespace dom
-}  // namespace mozilla
+}  // namespace mozilla::dom
 
 #endif  // DOM_MEDIA_EME_MEDIAKEYSYSTEMACCESSPERMISSIONREQUEST_H_
--- a/dom/media/fake-cdm/cdm-test-output-protection.h
+++ b/dom/media/fake-cdm/cdm-test-output-protection.h
@@ -9,18 +9,17 @@
 #  include <stdio.h>
 #  include <string>
 #  include <vector>
 #  include <windows.h>
 
 #  include "opmapi.h"
 #endif
 
-namespace mozilla {
-namespace cdmtest {
+namespace mozilla::cdmtest {
 
 #if defined(XP_WIN)
 typedef HRESULT(STDAPICALLTYPE* OPMGetVideoOutputsFromHMONITORProc)(
     HMONITOR, OPM_VIDEO_OUTPUT_SEMANTICS, ULONG*, IOPMVideoOutput***);
 
 static OPMGetVideoOutputsFromHMONITORProc sOPMGetVideoOutputsFromHMONITORProc =
     nullptr;
 
@@ -119,10 +118,9 @@ static void RunOutputProtectionAPITests(
 #endif
 }
 
 static void TestOuputProtectionAPIs() {
   RunOutputProtectionAPITests();
   FakeDecryptor::Message("OP tests completed");
 }
 
-}  // namespace cdmtest
-}  // namespace mozilla
+}  // namespace mozilla::cdmtest
--- a/dom/media/gmp/ChromiumCDMChild.h
+++ b/dom/media/gmp/ChromiumCDMChild.h
@@ -6,18 +6,17 @@
 #ifndef ChromiumCDMChild_h_
 #define ChromiumCDMChild_h_
 
 #include "content_decryption_module.h"
 #include "mozilla/gmp/PChromiumCDMChild.h"
 #include "SimpleMap.h"
 #include "WidevineVideoFrame.h"
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class GMPContentChild;
 
 class ChromiumCDMChild : public PChromiumCDMChild, public cdm::Host_10 {
  public:
   // Mark AddRef and Release as `final`, as they overload pure virtual
   // implementations in PChromiumCDMChild.
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ChromiumCDMChild, final);
@@ -136,12 +135,11 @@ class ChromiumCDMChild : public PChromiu
   nsCString mStorageId;
 
   typedef MozPromise<bool, nsresult, /* IsExclusive = */ true> InitPromise;
   // Created when we RecvInit, should be resolved once the CDM is initialized
   // or rejected if init fails.
   MozPromiseHolder<InitPromise> mInitPromise;
 };
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif  // ChromiumCDMChild_h_
--- a/dom/media/gmp/GMPContentChild.h
+++ b/dom/media/gmp/GMPContentChild.h
@@ -8,18 +8,17 @@
 
 #include "mozilla/gmp/PGMPContentChild.h"
 #include "GMPSharedMemManager.h"
 
 #if defined(MOZ_SANDBOX) && defined(MOZ_DEBUG) && defined(ENABLE_TESTS)
 #  include "mozilla/SandboxTestingChild.h"
 #endif
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class GMPChild;
 
 class GMPContentChild : public PGMPContentChild, public GMPSharedMem {
  public:
   // Mark AddRef and Release as `final`, as they overload pure virtual
   // implementations in PGMPContentChild.
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GMPContentChild, final)
@@ -57,12 +56,11 @@ class GMPContentChild : public PGMPConte
   bool IsUsed();
 
   GMPChild* mGMPChild;
 
  private:
   ~GMPContentChild() = default;
 };
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif  // GMPContentChild_h_
--- a/dom/media/gmp/GMPContentParent.h
+++ b/dom/media/gmp/GMPContentParent.h
@@ -5,18 +5,17 @@
 
 #ifndef GMPContentParent_h_
 #define GMPContentParent_h_
 
 #include "mozilla/gmp/PGMPContentParent.h"
 #include "GMPSharedMemManager.h"
 #include "nsISupportsImpl.h"
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class GMPParent;
 class GMPVideoDecoderParent;
 class GMPVideoEncoderParent;
 class ChromiumCDMParent;
 
 class GMPContentParent final : public PGMPContentParent, public GMPSharedMem {
   friend class PGMPContentParent;
@@ -81,12 +80,11 @@ class GMPContentParent final : public PG
   nsTArray<RefPtr<ChromiumCDMParent>> mChromiumCDMs;
   nsCOMPtr<nsISerialEventTarget> mGMPEventTarget;
   RefPtr<GMPParent> mParent;
   nsCString mDisplayName;
   uint32_t mPluginId;
   uint32_t mCloseBlockerCount = 0;
 };
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif  // GMPParent_h_
--- a/dom/media/gmp/GMPLoader.h
+++ b/dom/media/gmp/GMPLoader.h
@@ -12,18 +12,17 @@
 #include "gmp-entrypoints.h"
 #include "mozilla/UniquePtr.h"
 #include "nsString.h"
 
 #if defined(XP_MACOSX) && defined(MOZ_SANDBOX)
 #  include "mozilla/Sandbox.h"
 #endif
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class SandboxStarter {
  public:
   virtual ~SandboxStarter() = default;
   virtual bool Start(const char* aLibPath) = 0;
 };
 
 // Interface that adapts a plugin to the GMP API.
@@ -71,12 +70,11 @@ class GMPLoader {
 
   bool CanSandbox() const;
 
  private:
   UniquePtr<SandboxStarter> mSandboxStarter;
   UniquePtr<GMPAdapter> mAdapter;
 };
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif  // GMP_LOADER_H__
--- a/dom/media/gmp/GMPParent.h
+++ b/dom/media/gmp/GMPParent.h
@@ -17,18 +17,17 @@
 #include "nsCOMPtr.h"
 #include "nscore.h"
 #include "nsISupports.h"
 #include "nsString.h"
 #include "nsTArray.h"
 #include "nsIFile.h"
 #include "mozilla/MozPromise.h"
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class GMPCapability {
  public:
   explicit GMPCapability() = default;
   GMPCapability(GMPCapability&& aOther)
       : mAPIName(std::move(aOther.mAPIName)),
         mAPITags(std::move(aOther.mAPITags)) {}
   explicit GMPCapability(const nsCString& aAPIName) : mAPIName(aAPIName) {}
@@ -238,12 +237,11 @@ class GMPParent final
   // The child process architecture to use.
   uint32_t mChildLaunchArch;
   nsCString mPluginFilePath;
 #endif
 
   const nsCOMPtr<nsISerialEventTarget> mMainThread;
 };
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif  // GMPParent_h_
--- a/dom/media/gmp/GMPPlatform.h
+++ b/dom/media/gmp/GMPPlatform.h
@@ -4,33 +4,29 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GMPPlatform_h_
 #define GMPPlatform_h_
 
 #include "gmp-platform.h"
 #include <functional>
 
-namespace mozilla {
-namespace ipc {
+namespace mozilla::ipc {
 class ByteBuf;
-}  // namespace ipc
-}  // namespace mozilla
+}  // namespace mozilla::ipc
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class GMPChild;
 
 void InitPlatformAPI(GMPPlatformAPI& aPlatformAPI, GMPChild* aChild);
 
 GMPErr RunOnMainThread(GMPTask* aTask);
 
 GMPTask* NewGMPTask(std::function<void()>&& aFunction);
 
 GMPErr SetTimerOnMainThread(GMPTask* aTask, int64_t aTimeoutMS);
 
 void SendFOGData(ipc::ByteBuf&& buf);
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif  // GMPPlatform_h_
--- a/dom/media/gmp/GMPProcessChild.h
+++ b/dom/media/gmp/GMPProcessChild.h
@@ -4,18 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GMPProcessChild_h_
 #define GMPProcessChild_h_
 
 #include "mozilla/ipc/ProcessChild.h"
 #include "GMPChild.h"
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class GMPLoader;
 
 class GMPProcessChild final : public mozilla::ipc::ProcessChild {
  protected:
   typedef mozilla::ipc::ProcessChild ProcessChild;
 
  public:
@@ -25,12 +24,11 @@ class GMPProcessChild final : public moz
   bool Init(int aArgc, char* aArgv[]) override;
   void CleanUp() override;
 
  private:
   GMPChild mPlugin;
   DISALLOW_COPY_AND_ASSIGN(GMPProcessChild);
 };
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif  // GMPProcessChild_h_
--- a/dom/media/gmp/GMPProcessParent.h
+++ b/dom/media/gmp/GMPProcessParent.h
@@ -11,18 +11,17 @@
 #include "base/basictypes.h"
 #include "base/file_path.h"
 #include "base/thread.h"
 #include "chrome/common/child_process_host.h"
 #include "mozilla/ipc/GeckoChildProcessHost.h"
 
 class nsIRunnable;
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class GMPProcessParent final : public mozilla::ipc::GeckoChildProcessHost {
  public:
   explicit GMPProcessParent(const std::string& aGMPPath);
 
   // Synchronously launch the plugin process. If the process fails to launch
   // after timeoutMs, this method will return false.
   bool Launch(int32_t aTimeoutMs);
@@ -101,12 +100,11 @@ class GMPProcessParent final : public mo
 
 #if defined(XP_MACOSX) && defined(__aarch64__)
   uint32_t mChildLaunchArch;
 #endif
 
   DISALLOW_COPY_AND_ASSIGN(GMPProcessParent);
 };
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif  // ifndef GMPProcessParent_h
--- a/dom/media/gmp/GMPServiceChild.h
+++ b/dom/media/gmp/GMPServiceChild.h
@@ -10,18 +10,17 @@
 #include "MediaResult.h"
 #include "base/process.h"
 #include "mozilla/dom/PContent.h"
 #include "mozilla/gmp/PGMPServiceChild.h"
 #include "mozilla/MozPromise.h"
 #include "nsIAsyncShutdown.h"
 #include "nsRefPtrHashtable.h"
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class GMPContentParent;
 class GMPServiceChild;
 
 class GeckoMediaPluginServiceChild : public GeckoMediaPluginService,
                                      public nsIAsyncShutdownBlocker {
   friend class GMPServiceChild;
 
@@ -154,12 +153,11 @@ class GMPServiceChild : public PGMPServi
   bool HaveContentParents() const;
 
  private:
   ~GMPServiceChild() = default;
 
   nsRefPtrHashtable<nsUint64HashKey, GMPContentParent> mContentParents;
 };
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif  // GMPServiceChild_h_
--- a/dom/media/gmp/GMPSharedMemManager.h
+++ b/dom/media/gmp/GMPSharedMemManager.h
@@ -4,18 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GMPSharedMemManager_h_
 #define GMPSharedMemManager_h_
 
 #include "mozilla/ipc/Shmem.h"
 #include "nsTArray.h"
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class GMPSharedMemManager;
 
 class GMPSharedMem {
  public:
   typedef enum {
     kGMPFrameData = 0,
     kGMPEncodedData,
@@ -73,12 +72,11 @@ class GMPSharedMemManager {
  private:
   nsTArray<ipc::Shmem>& GetGmpFreelist(GMPSharedMem::GMPMemoryClasses aTypes) {
     return mData->mGmpFreelist[aTypes];
   }
 
   GMPSharedMem* mData;
 };
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif  // GMPSharedMemManager_h_
--- a/dom/media/gmp/GMPStorage.h
+++ b/dom/media/gmp/GMPStorage.h
@@ -7,18 +7,17 @@
 #define GMPStorage_h_
 
 #include "gmp-storage.h"
 #include "mozilla/AlreadyAddRefed.h"
 #include "nsISupportsImpl.h"
 #include "nsString.h"
 #include "nsTArray.h"
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class GMPStorage {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GMPStorage)
 
   virtual GMPErr Open(const nsCString& aRecordName) = 0;
   virtual bool IsOpen(const nsCString& aRecordName) const = 0;
   virtual GMPErr Read(const nsCString& aRecordName,
@@ -30,12 +29,11 @@ class GMPStorage {
  protected:
   virtual ~GMPStorage() = default;
 };
 
 already_AddRefed<GMPStorage> CreateGMPMemoryStorage();
 already_AddRefed<GMPStorage> CreateGMPDiskStorage(const nsCString& aNodeId,
                                                   const nsString& aGMPName);
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif
--- a/dom/media/gmp/GMPStorageChild.h
+++ b/dom/media/gmp/GMPStorageChild.h
@@ -9,18 +9,17 @@
 #include "mozilla/gmp/PGMPStorageChild.h"
 #include "gmp-storage.h"
 #include "nsTHashtable.h"
 #include "nsRefPtrHashtable.h"
 #include "gmp-platform.h"
 
 #include <queue>
 
-namespace mozilla {
-namespace gmp {
+namespace mozilla::gmp {
 
 class GMPChild;
 class GMPStorageChild;
 
 class GMPRecordImpl : public GMPRecord {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GMPRecordImpl)
 
@@ -85,12 +84,11 @@ class GMPStorageChild : public PGMPStora
 
  private:
   Monitor mMonitor MOZ_UNANNOTATED;
   nsRefPtrHashtable<nsCStringHashKey, GMPRecordImpl> mRecords;
   GMPChild* mPlugin;
   bool mShutdown;
 };
 
-}  // namespace gmp
-}  // namespace mozilla
+}  // namespace mozilla::gmp
 
 #endif  // GMPStorageChild_h_