chromium/storage/browser/file_system/file_system_usage_cache.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "storage/browser/file_system/file_system_usage_cache.h"

#include <stddef.h>
#include <stdint.h>

#include <memory>
#include <utility>

#include "base/containers/contains.h"
#include "base/containers/span.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/pickle.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"

namespace storage {

namespace {
constexpr base::TimeDelta kCloseDelay =;
const size_t kMaxHandleCacheSize =;
}  // namespace

FileSystemUsageCache::FileSystemUsageCache(bool is_incognito)
    :{}

FileSystemUsageCache::~FileSystemUsageCache() {}

const base::FilePath::CharType FileSystemUsageCache::kUsageFileName[] =);
const char FileSystemUsageCache::kUsageFileHeader[] =;
const size_t FileSystemUsageCache::kUsageFileHeaderSize =;

// Pickle::{Read,Write}Bool treat bool as int
const int FileSystemUsageCache::kUsageFileSize =;  // NOLINT

bool FileSystemUsageCache::GetUsage(const base::FilePath& usage_file_path,
                                    int64_t* usage_out) {}

bool FileSystemUsageCache::GetDirty(const base::FilePath& usage_file_path,
                                    uint32_t* dirty_out) {}

bool FileSystemUsageCache::IncrementDirty(
    const base::FilePath& usage_file_path) {}

bool FileSystemUsageCache::DecrementDirty(
    const base::FilePath& usage_file_path) {}

bool FileSystemUsageCache::Invalidate(const base::FilePath& usage_file_path) {}

bool FileSystemUsageCache::IsValid(const base::FilePath& usage_file_path) {}

bool FileSystemUsageCache::AtomicUpdateUsageByDelta(
    const base::FilePath& usage_file_path,
    int64_t delta) {}

bool FileSystemUsageCache::UpdateUsage(const base::FilePath& usage_file_path,
                                       int64_t fs_usage) {}

bool FileSystemUsageCache::Exists(const base::FilePath& usage_file_path) {}

bool FileSystemUsageCache::Delete(const base::FilePath& usage_file_path) {}

void FileSystemUsageCache::CloseCacheFiles() {}

bool FileSystemUsageCache::Read(const base::FilePath& usage_file_path,
                                bool* is_valid,
                                uint32_t* dirty_out,
                                int64_t* usage_out) {}

bool FileSystemUsageCache::Write(const base::FilePath& usage_file_path,
                                 bool is_valid,
                                 int32_t dirty,
                                 int64_t usage) {}

base::File* FileSystemUsageCache::GetFile(const base::FilePath& file_path) {}

bool FileSystemUsageCache::ReadBytes(const base::FilePath& file_path,
                                     base::span<uint8_t> buffer) {}

bool FileSystemUsageCache::WriteBytes(const base::FilePath& file_path,
                                      base::span<const uint8_t> buffer) {}

bool FileSystemUsageCache::FlushFile(const base::FilePath& file_path) {}

void FileSystemUsageCache::ScheduleCloseTimer() {}

bool FileSystemUsageCache::HasCacheFileHandle(const base::FilePath& file_path) {}

}  // namespace storage