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 file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef DOM_QUOTA_CLIENTUSAGEARAY_H_
8 #define DOM_QUOTA_CLIENTUSAGEARAY_H_
11 #include "mozilla/Maybe.h"
12 #include "mozilla/dom/quota/Client.h"
14 namespace mozilla::dom::quota
{
16 // XXX Change this not to derive from AutoTArray.
17 class ClientUsageArray final
18 : public AutoTArray
<Maybe
<uint64_t>, Client::TYPE_MAX
> {
20 ClientUsageArray() { SetLength(Client::TypeMax()); }
22 void Serialize(nsACString
& aText
) const;
24 nsresult
Deserialize(const nsACString
& aText
);
26 ClientUsageArray
Clone() const {
33 } // namespace mozilla::dom::quota
35 #endif // DOM_QUOTA_CLIENTUSAGEARAY_H_