Bug 1723050 - Part 5: Replace typedef by using in dom/cache/ r=janv

Differential Revision: https://phabricator.services.mozilla.com/D121297
This commit is contained in:
Kagami Sascha Rosylight 2021-08-06 12:10:13 +00:00
parent 139e2aaeaa
commit 7237431b99
7 changed files with 11 additions and 11 deletions

View File

@ -47,8 +47,8 @@ class StreamList;
class MOZ_STACK_CLASS AutoChildOpArgs final {
public:
typedef TypeUtils::BodyAction BodyAction;
typedef TypeUtils::SchemeAction SchemeAction;
using BodyAction = TypeUtils::BodyAction;
using SchemeAction = TypeUtils::SchemeAction;
AutoChildOpArgs(TypeUtils* aTypeUtils, const CacheOpArgs& aOpArgs,
uint32_t aEntryCount);

View File

@ -39,7 +39,7 @@ class CacheWorkerRef;
class CacheStorage final : public nsISupports,
public nsWrapperCache,
public TypeUtils {
typedef mozilla::ipc::PBackgroundChild PBackgroundChild;
using PBackgroundChild = mozilla::ipc::PBackgroundChild;
public:
static already_AddRefed<CacheStorage> CreateOnMainThread(

2
dom/cache/Context.h vendored
View File

@ -64,7 +64,7 @@ class Manager;
// the "profile-before-change" shutdown event to complete. This is ensured
// via the code in ShutdownObserver.cpp.
class Context final : public SafeRefCounted<Context> {
typedef mozilla::dom::quota::DirectoryLock DirectoryLock;
using DirectoryLock = mozilla::dom::quota::DirectoryLock;
public:
// Define a class allowing other threads to hold the Context alive. This also

View File

@ -344,7 +344,7 @@ static_assert(
namespace {
typedef int32_t EntryId;
using EntryId = int32_t;
struct IdCount {
explicit IdCount(int32_t aId) : mId(aId), mCount(1) {}
@ -2285,7 +2285,7 @@ nsresult Validate(mozIStorageConnection& aConn) {
// Schema migration code
// -----
typedef nsresult (*MigrationFunc)(mozIStorageConnection&, bool&);
using MigrationFunc = nsresult (*)(mozIStorageConnection&, bool&);
struct Migration {
int32_t mFromVersion;
MigrationFunc mFunc;

4
dom/cache/Manager.h vendored
View File

@ -216,7 +216,7 @@ class Manager final : public SafeRefCounted<Manager> {
class OpenStreamAction;
typedef uint64_t ListenerId;
using ListenerId = uint64_t;
void Init(Maybe<Manager&> aOldManager);
void Shutdown();
@ -263,7 +263,7 @@ class Manager final : public SafeRefCounted<Manager> {
}
};
typedef nsTArray<ListenerEntry> ListenerList;
using ListenerList = nsTArray<ListenerEntry>;
ListenerList mListeners;
static ListenerId sNextListenerId;

View File

@ -72,7 +72,7 @@ class StreamControl {
private:
// Hold strong references to ReadStream object. When the stream is closed
// it should call NoteClosed() or ForgetReadStream() to release this ref.
typedef nsTObserverArray<SafeRefPtr<ReadStream::Controllable>> ReadStreamList;
using ReadStreamList = nsTObserverArray<SafeRefPtr<ReadStream::Controllable>>;
ReadStreamList mReadStreamList;
};

4
dom/cache/Types.h vendored
View File

@ -26,7 +26,7 @@ enum Namespace {
};
static const Namespace INVALID_NAMESPACE = NUMBER_OF_NAMESPACES;
typedef int64_t CacheId;
using CacheId = int64_t;
static const CacheId INVALID_CACHE_ID = -1;
// XXX Rename to OriginMetadata.
@ -41,7 +41,7 @@ struct DeletionInfo {
int64_t mDeletedPaddingSize = 0;
};
typedef std::function<void(nsCOMPtr<nsIInputStream>&&)> InputStreamResolver;
using InputStreamResolver = std::function<void(nsCOMPtr<nsIInputStream>&&)>;
enum class OpenMode : uint8_t { Eager, Lazy, NumTypes };