Bug 1768189 - Part 44: Apply modernize-concat-nested-namespaces to dom/workers/WorkerStatus.h ... r=andi

Depends on D145779

Differential Revision: https://phabricator.services.mozilla.com/D145780
This commit is contained in:
Kagami Sascha Rosylight 2022-05-09 20:41:20 +00:00
Родитель 9902521a4c
Коммит 63a0a64ec2
25 изменённых файлов: 52 добавлений и 111 удалений

Просмотреть файл

@ -7,8 +7,7 @@
#ifndef mozilla_dom_workers_WorkerStatus_h #ifndef mozilla_dom_workers_WorkerStatus_h
#define mozilla_dom_workers_WorkerStatus_h #define mozilla_dom_workers_WorkerStatus_h
namespace mozilla { namespace mozilla::dom {
namespace dom {
/** /**
* Use this chart to help figure out behavior during each of the closing * Use this chart to help figure out behavior during each of the closing
@ -54,7 +53,6 @@ enum WorkerStatus {
Dead Dead
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif /* mozilla_dom_workers_WorkerStatus_h */ #endif /* mozilla_dom_workers_WorkerStatus_h */

Просмотреть файл

@ -8,8 +8,7 @@
#include "mozilla/dom/WorkerPrivate.h" #include "mozilla/dom/WorkerPrivate.h"
#include "mozilla/dom/WorkerTestUtils.h" #include "mozilla/dom/WorkerTestUtils.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
uint32_t WorkerTestUtils::CurrentTimerNestingLevel(const GlobalObject& aGlobal, uint32_t WorkerTestUtils::CurrentTimerNestingLevel(const GlobalObject& aGlobal,
ErrorResult& aErr) { ErrorResult& aErr) {
@ -19,5 +18,4 @@ uint32_t WorkerTestUtils::CurrentTimerNestingLevel(const GlobalObject& aGlobal,
return worker->GetCurrentTimerNestingLevel(); return worker->GetCurrentTimerNestingLevel();
} }
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla

Просмотреть файл

@ -29,10 +29,7 @@ using mozilla::dom::cache::Cache;
using mozilla::dom::cache::CacheStorage; using mozilla::dom::cache::CacheStorage;
using mozilla::ipc::PrincipalInfo; using mozilla::ipc::PrincipalInfo;
namespace mozilla { namespace mozilla::dom::workerinternals::loader {
namespace dom {
namespace workerinternals::loader {
/* /*
* [DOMDOC] CacheLoadHandler for Workers * [DOMDOC] CacheLoadHandler for Workers
@ -212,8 +209,6 @@ class CachePromiseHandler final : public PromiseNativeHandler {
ScriptLoadInfo& mLoadInfo; ScriptLoadInfo& mLoadInfo;
}; };
} // namespace workerinternals::loader } // namespace mozilla::dom::workerinternals::loader
} // namespace dom
} // namespace mozilla
#endif /* mozilla_dom_workers_CacheLoadHandler_h__ */ #endif /* mozilla_dom_workers_CacheLoadHandler_h__ */

Просмотреть файл

@ -10,10 +10,7 @@
#include "nsIStreamLoader.h" #include "nsIStreamLoader.h"
#include "mozilla/dom/ScriptLoadInfo.h" #include "mozilla/dom/ScriptLoadInfo.h"
namespace mozilla { namespace mozilla::dom::workerinternals::loader {
namespace dom {
namespace workerinternals::loader {
class WorkerScriptLoader; class WorkerScriptLoader;
@ -73,9 +70,6 @@ class NetworkLoadHandler final : public nsIStreamLoaderObserver,
ScriptLoadInfo& mLoadInfo; ScriptLoadInfo& mLoadInfo;
}; };
} // namespace workerinternals::loader } // namespace mozilla::dom::workerinternals::loader
} // namespace dom
} // namespace mozilla
#endif /* mozilla_dom_workers_NetworkLoadHandler_h__ */ #endif /* mozilla_dom_workers_NetworkLoadHandler_h__ */

Просмотреть файл

@ -16,8 +16,7 @@ class nsIChannel;
class nsIReferrerInfo; class nsIReferrerInfo;
class nsIURI; class nsIURI;
namespace mozilla { namespace mozilla::dom {
namespace dom {
class ClientInfo; class ClientInfo;
class WorkerPrivate; class WorkerPrivate;
@ -120,6 +119,5 @@ struct ScriptLoadInfo {
} }
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif /* mozilla_dom_workers_ScriptLoadInfo_h__ */ #endif /* mozilla_dom_workers_ScriptLoadInfo_h__ */

Просмотреть файл

@ -15,13 +15,11 @@
#include "nsStreamUtils.h" #include "nsStreamUtils.h"
#include "mozilla/StaticPrefs_browser.h" #include "mozilla/StaticPrefs_browser.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
class WorkerPrivate; class WorkerPrivate;
namespace workerinternals { namespace workerinternals::loader {
namespace loader {
/* ScriptResponseHeaderProcessor /* ScriptResponseHeaderProcessor
* *
@ -73,10 +71,8 @@ class ScriptResponseHeaderProcessor final : public nsIRequestObserver {
const bool mIsMainScript; const bool mIsMainScript;
}; };
} // namespace loader } // namespace workerinternals::loader
} // namespace workerinternals
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif /* mozilla_dom_workers_ScriptResponseHeaderProcessor_h__ */ #endif /* mozilla_dom_workers_ScriptResponseHeaderProcessor_h__ */

Просмотреть файл

@ -22,8 +22,7 @@
class nsISerialEventTarget; class nsISerialEventTarget;
class nsIConsoleReportCollector; class nsIConsoleReportCollector;
namespace mozilla { namespace mozilla::dom {
namespace dom {
class ErrorValue; class ErrorValue;
class FetchEventOpProxyChild; class FetchEventOpProxyChild;
@ -173,7 +172,6 @@ class RemoteWorkerChild final
ThreadBound<LauncherBoundData> mLauncherData; ThreadBound<LauncherBoundData> mLauncherData;
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_RemoteWorkerChild_h #endif // mozilla_dom_RemoteWorkerChild_h

Просмотреть файл

@ -16,8 +16,7 @@
#include "mozilla/dom/ServiceWorkerOpArgs.h" #include "mozilla/dom/ServiceWorkerOpArgs.h"
#include "mozilla/dom/ServiceWorkerOpPromise.h" #include "mozilla/dom/ServiceWorkerOpPromise.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
/* Here's a graph about this remote workers are spawned. /* Here's a graph about this remote workers are spawned.
* *
@ -315,7 +314,6 @@ class RemoteWorkerController final {
nsTArray<UniquePtr<PendingOp>> mPendingOps; nsTArray<UniquePtr<PendingOp>> mPendingOps;
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_RemoteWorkerController_h #endif // mozilla_dom_RemoteWorkerController_h

Просмотреть файл

@ -13,8 +13,7 @@
#include "mozilla/RefPtr.h" #include "mozilla/RefPtr.h"
#include "mozilla/dom/PRemoteWorkerControllerChild.h" #include "mozilla/dom/PRemoteWorkerControllerChild.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
/** /**
* Parent-process main-thread proxy used by ServiceWorkerManager to control * Parent-process main-thread proxy used by ServiceWorkerManager to control
@ -60,7 +59,6 @@ class RemoteWorkerControllerChild final : public PRemoteWorkerControllerChild {
bool mIPCActive = true; bool mIPCActive = true;
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_remoteworkercontrollerchild_h__ #endif // mozilla_dom_remoteworkercontrollerchild_h__

Просмотреть файл

@ -15,8 +15,7 @@
#include "mozilla/RefPtr.h" #include "mozilla/RefPtr.h"
#include "mozilla/dom/PRemoteWorkerControllerParent.h" #include "mozilla/dom/PRemoteWorkerControllerParent.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
/** /**
* PBackground-resident proxy used by ServiceWorkerManager because canonical * PBackground-resident proxy used by ServiceWorkerManager because canonical
@ -78,7 +77,6 @@ class RemoteWorkerControllerParent final : public PRemoteWorkerControllerParent,
bool mIPCActive = true; bool mIPCActive = true;
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_remoteworkercontrollerparent_h__ #endif // mozilla_dom_remoteworkercontrollerparent_h__

Просмотреть файл

@ -15,8 +15,7 @@
#include "nsISupportsImpl.h" #include "nsISupportsImpl.h"
#include "nsTArray.h" #include "nsTArray.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
class RemoteWorkerController; class RemoteWorkerController;
class RemoteWorkerServiceParent; class RemoteWorkerServiceParent;
@ -114,7 +113,6 @@ class RemoteWorkerManager final {
nsTArray<Pending> mPendings; nsTArray<Pending> mPendings;
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_RemoteWorkerManager_h #endif // mozilla_dom_RemoteWorkerManager_h

Просмотреть файл

@ -9,8 +9,7 @@
#include "mozilla/dom/PRemoteWorkerParent.h" #include "mozilla/dom/PRemoteWorkerParent.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
class RemoteWorkerController; class RemoteWorkerController;
@ -56,7 +55,6 @@ class RemoteWorkerParent final : public PRemoteWorkerParent {
RefPtr<RemoteWorkerController> mController; RefPtr<RemoteWorkerController> mController;
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_RemoteWorkerParent_h #endif // mozilla_dom_RemoteWorkerParent_h

Просмотреть файл

@ -12,8 +12,7 @@
class nsIThread; class nsIThread;
namespace mozilla { namespace mozilla::dom {
namespace dom {
class RemoteWorkerServiceChild; class RemoteWorkerServiceChild;
@ -55,7 +54,6 @@ class RemoteWorkerService final : public nsIObserver {
RefPtr<RemoteWorkerServiceChild> mActor; RefPtr<RemoteWorkerServiceChild> mActor;
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_RemoteWorkerService_h #endif // mozilla_dom_RemoteWorkerService_h

Просмотреть файл

@ -7,12 +7,10 @@
#include "RemoteWorkerServiceChild.h" #include "RemoteWorkerServiceChild.h"
#include "RemoteWorkerController.h" #include "RemoteWorkerController.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
RemoteWorkerServiceChild::RemoteWorkerServiceChild() = default; RemoteWorkerServiceChild::RemoteWorkerServiceChild() = default;
RemoteWorkerServiceChild::~RemoteWorkerServiceChild() = default; RemoteWorkerServiceChild::~RemoteWorkerServiceChild() = default;
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla

Просмотреть файл

@ -10,8 +10,7 @@
#include "mozilla/dom/PRemoteWorkerServiceChild.h" #include "mozilla/dom/PRemoteWorkerServiceChild.h"
#include "nsISupportsImpl.h" #include "nsISupportsImpl.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
class RemoteWorkerController; class RemoteWorkerController;
class RemoteWorkerData; class RemoteWorkerData;
@ -30,7 +29,6 @@ class RemoteWorkerServiceChild final : public PRemoteWorkerServiceChild {
~RemoteWorkerServiceChild(); ~RemoteWorkerServiceChild();
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_RemoteWorkerServiceChild_h #endif // mozilla_dom_RemoteWorkerServiceChild_h

Просмотреть файл

@ -10,8 +10,7 @@
#include "mozilla/dom/PRemoteWorkerServiceParent.h" #include "mozilla/dom/PRemoteWorkerServiceParent.h"
#include "mozilla/dom/RemoteType.h" #include "mozilla/dom/RemoteType.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
class RemoteWorkerManager; class RemoteWorkerManager;
@ -35,7 +34,6 @@ class RemoteWorkerServiceParent final : public PRemoteWorkerServiceParent {
nsCString mRemoteType = NOT_REMOTE_TYPE; nsCString mRemoteType = NOT_REMOTE_TYPE;
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_RemoteWorkerServiceParent_h #endif // mozilla_dom_RemoteWorkerServiceParent_h

Просмотреть файл

@ -10,8 +10,7 @@
#include "mozilla/dom/PSharedWorkerChild.h" #include "mozilla/dom/PSharedWorkerChild.h"
#include "nsISupportsImpl.h" #include "nsISupportsImpl.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
class SharedWorker; class SharedWorker;
@ -55,7 +54,6 @@ class SharedWorkerChild final : public mozilla::dom::PSharedWorkerChild {
bool mActive; bool mActive;
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_dom_SharedWorkerChild_h #endif // mozilla_dom_dom_SharedWorkerChild_h

Просмотреть файл

@ -16,8 +16,7 @@
#include "nsIPrincipal.h" #include "nsIPrincipal.h"
#include "nsProxyRelease.h" #include "nsProxyRelease.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
// static // static
already_AddRefed<SharedWorkerManagerHolder> SharedWorkerManager::Create( already_AddRefed<SharedWorkerManagerHolder> SharedWorkerManager::Create(
@ -314,5 +313,4 @@ SharedWorkerManagerWrapper::~SharedWorkerManagerWrapper() {
mHolder.forget()); mHolder.forget());
} }
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla

Просмотреть файл

@ -15,8 +15,7 @@
class nsIPrincipal; class nsIPrincipal;
namespace mozilla { namespace mozilla::dom {
namespace dom {
class UniqueMessagePortId; class UniqueMessagePortId;
class RemoteWorkerData; class RemoteWorkerData;
@ -157,7 +156,6 @@ class SharedWorkerManager final : public RemoteWorkerObserver {
nsTArray<CheckedUnsafePtr<SharedWorkerManagerHolder>> mHolders; nsTArray<CheckedUnsafePtr<SharedWorkerManagerHolder>> mHolders;
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_SharedWorkerManager_h #endif // mozilla_dom_SharedWorkerManager_h

Просмотреть файл

@ -12,8 +12,7 @@
#include "mozilla/ipc/BackgroundUtils.h" #include "mozilla/ipc/BackgroundUtils.h"
#include "nsISupportsImpl.h" #include "nsISupportsImpl.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
class MessagePortIdentifier; class MessagePortIdentifier;
class RemoteWorkerData; class RemoteWorkerData;
@ -77,7 +76,6 @@ class SharedWorkerParent final
bool mFrozen; bool mFrozen;
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_dom_SharedWorkerParent_h #endif // mozilla_dom_dom_SharedWorkerParent_h

Просмотреть файл

@ -28,8 +28,7 @@
#include "xpcprivate.h" #include "xpcprivate.h"
#include "mozilla/ScopeExit.h" #include "mozilla/ScopeExit.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
class ExecutionRunnable final : public Runnable { class ExecutionRunnable final : public Runnable {
public: public:
@ -512,5 +511,4 @@ void Worklet::AddImportFetchHandler(const nsACString& aURI,
mImportHandlers.InsertOrUpdate(aURI, RefPtr{aHandler}); mImportHandlers.InsertOrUpdate(aURI, RefPtr{aHandler});
} }
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla

Просмотреть файл

@ -12,8 +12,7 @@
#include "nsContentUtils.h" #include "nsContentUtils.h"
#include "nsJSUtils.h" #include "nsJSUtils.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_CLASS(WorkletGlobalScope) NS_IMPL_CYCLE_COLLECTION_CLASS(WorkletGlobalScope)
@ -97,5 +96,4 @@ void WorkletGlobalScope::Dump(const Optional<nsAString>& aString) const {
fflush(stdout); fflush(stdout);
} }
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla

Просмотреть файл

@ -9,8 +9,7 @@
#include "mozilla/dom/WorkletImpl.h" #include "mozilla/dom/WorkletImpl.h"
#include "nsJSPrincipals.h" #include "nsJSPrincipals.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
WorkletPrincipals::WorkletPrincipals(WorkletImpl* aWorkletImpl) WorkletPrincipals::WorkletPrincipals(WorkletImpl* aWorkletImpl)
: JSPrincipals(), mWorkletImpl(aWorkletImpl) { : JSPrincipals(), mWorkletImpl(aWorkletImpl) {
@ -37,5 +36,4 @@ void WorkletPrincipals::Destroy(JSPrincipals* aPrincipals) {
delete static_cast<WorkletPrincipals*>(aPrincipals); delete static_cast<WorkletPrincipals*>(aPrincipals);
} }
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla

Просмотреть файл

@ -21,8 +21,7 @@
#include "js/Initialization.h" #include "js/Initialization.h"
#include "XPCSelfHostedShmem.h" #include "XPCSelfHostedShmem.h"
namespace mozilla { namespace mozilla::dom {
namespace dom {
namespace { namespace {
@ -462,5 +461,4 @@ WorkletThread::Observe(nsISupports* aSubject, const char* aTopic,
NS_IMPL_ISUPPORTS_INHERITED(WorkletThread, nsThread, nsIObserver) NS_IMPL_ISUPPORTS_INHERITED(WorkletThread, nsThread, nsIObserver)
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla

Просмотреть файл

@ -17,8 +17,7 @@
class nsIRunnable; class nsIRunnable;
namespace mozilla { namespace mozilla::dom {
namespace dom {
class WorkletThread final : public nsThread, public nsIObserver { class WorkletThread final : public nsThread, public nsIObserver {
public: public:
@ -69,7 +68,6 @@ class WorkletThread final : public nsThread, public nsIObserver {
bool mIsTerminating; // main thread bool mIsTerminating; // main thread
}; };
} // namespace dom } // namespace mozilla::dom
} // namespace mozilla
#endif // mozilla_dom_worklet_WorkletThread_h #endif // mozilla_dom_worklet_WorkletThread_h