Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/quota/QuotaResults.h
Line
Count
Source (jump to first uncovered line)
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/. */
6
7
#ifndef mozilla_dom_quota_QuotaResults_h
8
#define mozilla_dom_quota_QuotaResults_h
9
10
#include "nsIQuotaResults.h"
11
12
namespace mozilla {
13
namespace dom {
14
namespace quota {
15
16
class UsageResult
17
  : public nsIQuotaUsageResult
18
{
19
  nsCString mOrigin;
20
  uint64_t mUsage;
21
  bool mPersisted;
22
  uint64_t mLastAccessed;
23
24
public:
25
  UsageResult(const nsACString& aOrigin,
26
              bool aPersisted,
27
              uint64_t aUsage,
28
              uint64_t aLastAccessed);
29
30
private:
31
  virtual ~UsageResult()
32
0
  { }
33
34
  NS_DECL_ISUPPORTS
35
  NS_DECL_NSIQUOTAUSAGERESULT
36
};
37
38
class OriginUsageResult
39
  : public nsIQuotaOriginUsageResult
40
{
41
  uint64_t mUsage;
42
  uint64_t mFileUsage;
43
  uint64_t mLimit;
44
45
public:
46
  OriginUsageResult(uint64_t aUsage,
47
                    uint64_t aFileUsage,
48
                    uint64_t aLimit);
49
50
private:
51
  virtual ~OriginUsageResult()
52
0
  { }
53
54
  NS_DECL_ISUPPORTS
55
  NS_DECL_NSIQUOTAORIGINUSAGERESULT
56
};
57
58
} // namespace quota
59
} // namespace dom
60
} // namespace mozilla
61
62
#endif // mozilla_dom_quota_QuotaResults_h