1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=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 mozilla_dom_quota_usageinfo_h__
8 #define mozilla_dom_quota_usageinfo_h__
10 #include "mozilla/dom/quota/QuotaCommon.h"
12 #include "mozilla/Atomics.h"
13 #include "Utilities.h"
21 : mCanceled(0), mDatabaseUsage(0), mFileUsage(0)
34 AppendToDatabaseUsage(uint64_t aUsage
)
36 IncrementUsage(&mDatabaseUsage
, aUsage
);
40 AppendToFileUsage(uint64_t aUsage
)
42 IncrementUsage(&mFileUsage
, aUsage
);
48 return mDatabaseUsage
;
60 uint64_t totalUsage
= mDatabaseUsage
;
61 IncrementUsage(&totalUsage
, mFileUsage
);
73 mozilla::Atomic
<int32_t> mCanceled
;
76 uint64_t mDatabaseUsage
;
82 #endif // mozilla_dom_quota_usageinfo_h__