no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / fs / parent / FileSystemQuotaClientFactory.h
blobf71587fac078398c087b8a3465c81c0d4522fef8
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"
13 template <class>
14 class RefPtr;
16 namespace mozilla::dom {
18 namespace quota {
20 class Client;
22 } // namespace quota
24 namespace fs {
26 class FileSystemQuotaClientFactory {
27 public:
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();
36 protected:
37 virtual ~FileSystemQuotaClientFactory() = default;
39 virtual already_AddRefed<quota::Client> AllocQuotaClient();
42 inline already_AddRefed<quota::Client> CreateQuotaClient() {
43 return FileSystemQuotaClientFactory::CreateQuotaClient();
46 } // namespace fs
47 } // namespace mozilla::dom
49 #endif // DOM_FS_PARENT_FILESYSTEMQUOTACLIENTFACTORY_H_