#include <stdint.h>
#include <cstdint>
#include <utility>
#include <vector>
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "components/services/storage/public/cpp/buckets/bucket_info.h"
#include "components/services/storage/public/cpp/buckets/constants.h"
#include "components/services/storage/public/cpp/quota_error_or.h"
#include "components/services/storage/public/mojom/quota_client.mojom.h"
#include "storage/browser/quota/quota_client_type.h"
#include "storage/browser/quota/quota_manager_impl.h"
#include "storage/browser/quota/usage_tracker.h"
#include "storage/browser/test/mock_special_storage_policy.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
StorageKey;
QuotaStatusCode;
StorageType;
namespace storage {
namespace {
class UsageTrackerTestQuotaClient : public mojom::QuotaClient { … };
std::pair<int64_t, blink::mojom::UsageBreakdownPtr> to_pair(
std::tuple<int64_t, blink::mojom::UsageBreakdownPtr> t) { … }
}
class UsageTrackerTest : public testing::Test { … };
TEST_F(UsageTrackerTest, GrantAndRevokeUnlimitedStorage) { … }
TEST_F(UsageTrackerTest, CacheDisabledClientTest) { … }
TEST_F(UsageTrackerTest, GlobalUsageUnlimitedUncached) { … }
TEST_F(UsageTrackerTest, GlobalUsageMultipleStorageKeysPerHostCachedInit) { … }
TEST_F(UsageTrackerTest, GlobalUsageMultipleStorageKeysPerHostCachedUpdate) { … }
TEST_F(UsageTrackerTest, GlobalUsageMultipleStorageKeysPerHostUncachedInit) { … }
TEST_F(UsageTrackerTest, GlobalUsageMultipleStorageKeysPerHostUncachedUpdate) { … }
TEST_F(UsageTrackerTest, QuotaDatabaseDisabled) { … }
TEST_F(UsageTrackerTest, IsWorking) { … }
}