1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef DOM_FS_PARENT_FILESYSTEMQUOTACLIENTFACTORY_H_
8 #define DOM_FS_PARENT_FILESYSTEMQUOTACLIENTFACTORY_H_
10 #include "mozilla/AlreadyAddRefed.h"
11 #include "nsISupportsUtils.h"
16 namespace mozilla::dom
{
26 class FileSystemQuotaClientFactory
{
28 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(
29 mozilla::dom::fs::FileSystemQuotaClientFactory
);
31 static void SetCustomFactory(
32 RefPtr
<FileSystemQuotaClientFactory
> aCustomFactory
);
34 static already_AddRefed
<quota::Client
> CreateQuotaClient();
37 virtual ~FileSystemQuotaClientFactory() = default;
39 virtual already_AddRefed
<quota::Client
> AllocQuotaClient();
42 inline already_AddRefed
<quota::Client
> CreateQuotaClient() {
43 return FileSystemQuotaClientFactory::CreateQuotaClient();
47 } // namespace mozilla::dom
49 #endif // DOM_FS_PARENT_FILESYSTEMQUOTACLIENTFACTORY_H_