mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
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:
parent
139e2aaeaa
commit
7237431b99
4
dom/cache/AutoUtils.h
vendored
4
dom/cache/AutoUtils.h
vendored
@ -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);
|
||||
|
2
dom/cache/CacheStorage.h
vendored
2
dom/cache/CacheStorage.h
vendored
@ -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
2
dom/cache/Context.h
vendored
@ -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
|
||||
|
4
dom/cache/DBSchema.cpp
vendored
4
dom/cache/DBSchema.cpp
vendored
@ -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
4
dom/cache/Manager.h
vendored
@ -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;
|
||||
|
||||
|
2
dom/cache/StreamControl.h
vendored
2
dom/cache/StreamControl.h
vendored
@ -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
4
dom/cache/Types.h
vendored
@ -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 };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user