Skip to content

Commit

Permalink
Bug 1768189 - Part 30: Apply modernize-concat-nested-namespaces to do…
Browse files Browse the repository at this point in the history
…m/serviceworkers/ServiceWorkerUnregisterCallback.cpp ... r=andi

Depends on D145763

Differential Revision: https://phabricator.services.mozilla.com/D145764
  • Loading branch information
saschanaz committed May 9, 2022
1 parent 0e60dc5 commit e9a92f2
Show file tree
Hide file tree
Showing 25 changed files with 50 additions and 100 deletions.
6 changes: 2 additions & 4 deletions dom/serviceworkers/ServiceWorkerUnregisterCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

#include "ServiceWorkerUnregisterCallback.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

NS_IMPL_ISUPPORTS(UnregisterCallback, nsIServiceWorkerUnregisterCallback)

Expand All @@ -33,5 +32,4 @@ UnregisterCallback::UnregisterFailed() {

RefPtr<GenericPromise> UnregisterCallback::Promise() const { return mPromise; }

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
6 changes: 2 additions & 4 deletions dom/serviceworkers/ServiceWorkerUnregisterCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
#include "mozilla/RefPtr.h"
#include "nsIServiceWorkerManager.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

class UnregisterCallback final : public nsIServiceWorkerUnregisterCallback {
public:
Expand All @@ -37,7 +36,6 @@ class UnregisterCallback final : public nsIServiceWorkerUnregisterCallback {
RefPtr<GenericPromise::Private> mPromise;
};

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

#endif // mozilla_dom_ServiceWorkerUnregisterCallback_h
6 changes: 2 additions & 4 deletions dom/serviceworkers/ServiceWorkerUnregisterJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
#include "nsThreadUtils.h"
#include "ServiceWorkerManager.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

class ServiceWorkerUnregisterJob::PushUnsubscribeCallback final
: public nsIUnsubscribeResultCallback {
Expand Down Expand Up @@ -135,5 +134,4 @@ void ServiceWorkerUnregisterJob::Unregister() {
Finish(NS_OK);
}

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
6 changes: 2 additions & 4 deletions dom/serviceworkers/ServiceWorkerUnregisterJob.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

#include "ServiceWorkerJob.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

class ServiceWorkerUnregisterJob final : public ServiceWorkerJob {
public:
Expand All @@ -32,7 +31,6 @@ class ServiceWorkerUnregisterJob final : public ServiceWorkerJob {
bool mSendToParent;
};

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

#endif // mozilla_dom_serviceworkerunregisterjob_h
6 changes: 2 additions & 4 deletions dom/serviceworkers/ServiceWorkerUpdateJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
#include "ServiceWorkerScriptCache.h"
#include "mozilla/dom/WorkerCommon.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

using serviceWorkerScriptCache::OnFailure;

Expand Down Expand Up @@ -539,5 +538,4 @@ void ServiceWorkerUpdateJob::ContinueAfterInstallEvent(
mRegistration->TryToActivateAsync();
}

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
6 changes: 2 additions & 4 deletions dom/serviceworkers/ServiceWorkerUpdateJob.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

#include "nsIRequest.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

namespace serviceWorkerScriptCache {
enum class OnFailure : uint8_t;
Expand Down Expand Up @@ -93,7 +92,6 @@ class ServiceWorkerUpdateJob : public ServiceWorkerJob {
serviceWorkerScriptCache::OnFailure mOnFailure;
};

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

#endif // mozilla_dom_serviceworkerupdatejob_h
6 changes: 2 additions & 4 deletions dom/serviceworkers/ServiceWorkerUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
#include "nsIURL.h"
#include "nsPrintfCString.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

bool ServiceWorkerRegistrationDataIsValid(
const ServiceWorkerRegistrationData& aData) {
Expand Down Expand Up @@ -144,5 +143,4 @@ void ServiceWorkerScopeAndScriptAreValid(const ClientInfo& aClientInfo,
}
}

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
6 changes: 2 additions & 4 deletions dom/simpledb/SDBRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
class nsISDBCallback;
class nsIVariant;

namespace mozilla {
namespace dom {
namespace mozilla::dom {

class SDBConnection;

Expand Down Expand Up @@ -58,7 +57,6 @@ class SDBRequest final : public nsISDBRequest {
NS_DECL_CYCLE_COLLECTION_CLASS(SDBRequest)
};

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

#endif // mozilla_dom_simpledb_SDBRequest_h
6 changes: 2 additions & 4 deletions dom/simpledb/SDBResults.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
#include "nsISupports.h"
#include "nsString.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

class SDBResult : public nsISDBResult {
nsCString mData;
Expand All @@ -27,7 +26,6 @@ class SDBResult : public nsISDBResult {
NS_DECL_NSISDBRESULT
};

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

#endif // mozilla_dom_simpledb_SDBResults_h
6 changes: 2 additions & 4 deletions dom/simpledb/SimpleDBCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@

#include "mozilla/dom/quota/QuotaCommon.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

extern const char* kPrefSimpleDBEnabled;

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

#endif // mozilla_dom_simpledb_SimpledbCommon_h
6 changes: 2 additions & 4 deletions dom/smil/TimeEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
#include "nsPresContext.h"
#include "nsGlobalWindow.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

TimeEvent::TimeEvent(EventTarget* aOwner, nsPresContext* aPresContext,
InternalSMILTimeEvent* aEvent)
Expand Down Expand Up @@ -46,8 +45,7 @@ void TimeEvent::InitTimeEvent(const nsAString& aType,
mView = aView ? aView->GetOuterWindow() : nullptr;
}

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

using namespace mozilla;
using namespace mozilla::dom;
Expand Down
6 changes: 2 additions & 4 deletions dom/smil/TimeEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

class nsGlobalWindowInner;

namespace mozilla {
namespace dom {
namespace mozilla::dom {

class TimeEvent final : public Event {
public:
Expand Down Expand Up @@ -53,8 +52,7 @@ class TimeEvent final : public Event {
int32_t mDetail;
};

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

already_AddRefed<mozilla::dom::TimeEvent> NS_NewDOMTimeEvent(
mozilla::dom::EventTarget* aOwner, nsPresContext* aPresContext,
Expand Down
6 changes: 2 additions & 4 deletions dom/storage/LocalStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#include "Storage.h"
#include "nsWeakReference.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

class LocalStorageCache;
class LocalStorageManager;
Expand Down Expand Up @@ -79,7 +78,6 @@ class LocalStorage final : public Storage, public nsSupportsWeakReference {
const nsAString& aNewValue);
};

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

#endif // mozilla_dom_LocalStorage_h
6 changes: 2 additions & 4 deletions dom/storage/LocalStorageCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
#include "nsProxyRelease.h"
#include "nsThreadUtils.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

#define DOM_STORAGE_CACHE_KEEP_ALIVE_TIME_MS 20000

Expand Down Expand Up @@ -613,5 +612,4 @@ bool StorageUsage::CheckAndSetETLD1UsageDelta(
return true;
}

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
6 changes: 2 additions & 4 deletions dom/storage/LocalStorageCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
#include "mozilla/Telemetry.h"
#include "mozilla/Atomics.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

class LocalStorage;
class LocalStorageCacheChild;
Expand Down Expand Up @@ -302,7 +301,6 @@ class StorageUsage : public StorageUsageBridge {
int64_t mUsage[LocalStorageCache::kDataSetCount];
};

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

#endif // mozilla_dom_LocalStorageCache_h
6 changes: 2 additions & 4 deletions dom/storage/LocalStorageManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
#include "mozilla/StaticPrefs_dom.h"
#include "mozilla/dom/LocalStorageCommon.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

using namespace StorageUtils;

Expand Down Expand Up @@ -452,5 +451,4 @@ LocalStorageManager* LocalStorageManager::Ensure() {
return sSelf;
}

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
6 changes: 2 additions & 4 deletions dom/storage/PartitionedLocalStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

#include "mozilla/dom/StorageBinding.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION_INHERITED(PartitionedLocalStorage, Storage);

Expand Down Expand Up @@ -131,5 +130,4 @@ bool PartitionedLocalStorage::IsForkOf(const Storage* aOther) const {
return mCache == static_cast<const PartitionedLocalStorage*>(aOther)->mCache;
}

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
6 changes: 2 additions & 4 deletions dom/storage/PartitionedLocalStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

class nsIPrincipal;

namespace mozilla {
namespace dom {
namespace mozilla::dom {

class SessionStorageCache;

Expand Down Expand Up @@ -60,7 +59,6 @@ class PartitionedLocalStorage final : public Storage {
RefPtr<SessionStorageCache> mCache;
};

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

#endif // mozilla_dom_PartitionedLocalStorage_h
6 changes: 2 additions & 4 deletions dom/storage/SessionStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
#include "nsPIDOMWindow.h"
#include "nsThreadUtils.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION_INHERITED(SessionStorage, Storage, mManager);

Expand Down Expand Up @@ -256,5 +255,4 @@ nsresult SessionStorage::EnsureCacheLoadedOrCloned() const {
return mManager->LoadData(*StoragePrincipal(), *mCache);
}

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
6 changes: 2 additions & 4 deletions dom/storage/SessionStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

class nsIPrincipal;

namespace mozilla {
namespace dom {
namespace mozilla::dom {

class SessionStorageCache;
class SessionStorageManager;
Expand Down Expand Up @@ -82,7 +81,6 @@ class SessionStorage final : public Storage {
bool mHasPendingStableStateCallback;
};

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

#endif // mozilla_dom_SessionStorage_h
6 changes: 2 additions & 4 deletions dom/storage/SessionStorageCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
#include "mozilla/dom/PBackgroundSessionStorageCache.h"
#include "nsDOMString.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

void SSWriteOptimizer::Enumerate(nsTArray<SSWriteInfo>& aWriteInfos) {
AssertIsOnOwningThread();
Expand Down Expand Up @@ -290,5 +289,4 @@ bool SessionStorageCache::DataSet::ProcessUsageDelta(int64_t aDelta) {
return true;
}

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
6 changes: 2 additions & 4 deletions dom/storage/SessionStorageManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
#include "nsTHashMap.h"
#include "nsThreadUtils.h"

namespace mozilla {
namespace dom {
namespace mozilla::dom {

using namespace StorageUtils;

Expand Down Expand Up @@ -985,5 +984,4 @@ void BackgroundSessionStorageManager::RemoveParticipatingActor(
mParticipatingActors.RemoveElement(aActor);
}

} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
Loading

0 comments on commit e9a92f2

Please sign in to comment.