#include "storage/browser/file_system/sandbox_quota_observer.h"
#include <stdint.h>
#include "base/files/file_error_or.h"
#include "base/functional/bind.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/sequenced_task_runner.h"
#include "storage/browser/file_system/file_system_usage_cache.h"
#include "storage/browser/file_system/file_system_util.h"
#include "storage/browser/file_system/sandbox_file_system_backend_delegate.h"
#include "storage/browser/quota/quota_client_type.h"
#include "storage/browser/quota/quota_manager_proxy.h"
#include "storage/common/file_system/file_system_util.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
namespace storage {
SandboxQuotaObserver::SandboxQuotaObserver(
scoped_refptr<QuotaManagerProxy> quota_manager_proxy,
scoped_refptr<base::SequencedTaskRunner> update_notify_runner,
ObfuscatedFileUtil* sandbox_file_util,
FileSystemUsageCache* file_system_usage_cache)
: … { … }
SandboxQuotaObserver::~SandboxQuotaObserver() = default;
void SandboxQuotaObserver::OnStartUpdate(const FileSystemURL& url) { … }
void SandboxQuotaObserver::OnUpdate(const FileSystemURL& url, int64_t delta) { … }
void SandboxQuotaObserver::OnEndUpdate(const FileSystemURL& url) { … }
void SandboxQuotaObserver::OnAccess(const FileSystemURL& url) { … }
void SandboxQuotaObserver::SetUsageCacheEnabled(const url::Origin& origin,
FileSystemType type,
bool enabled) { … }
base::FileErrorOr<base::FilePath> SandboxQuotaObserver::GetUsageCachePath(
const FileSystemURL& url) { … }
void SandboxQuotaObserver::ApplyPendingUsageUpdate() { … }
void SandboxQuotaObserver::UpdateUsageCacheFile(
const base::FilePath& usage_file_path,
int64_t delta) { … }
}