#include "storage/browser/test/sandbox_file_system_test_helper.h"
#include <memory>
#include <utility>
#include "base/files/file_error_or.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/run_loop.h"
#include "storage/browser/file_system/file_system_context.h"
#include "storage/browser/file_system/file_system_file_util.h"
#include "storage/browser/file_system/file_system_operation_context.h"
#include "storage/browser/file_system/file_system_operation_runner.h"
#include "storage/browser/file_system/file_system_url.h"
#include "storage/browser/file_system/file_system_usage_cache.h"
#include "storage/browser/file_system/obfuscated_file_util.h"
#include "storage/browser/file_system/sandbox_file_system_backend.h"
#include "storage/browser/quota/quota_manager_proxy.h"
#include "storage/browser/test/mock_special_storage_policy.h"
#include "storage/browser/test/test_file_system_context.h"
#include "storage/common/file_system/file_system_util.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace storage {
SandboxFileSystemTestHelper::SandboxFileSystemTestHelper(
const blink::StorageKey& storage_key,
FileSystemType type)
: … { … }
SandboxFileSystemTestHelper::SandboxFileSystemTestHelper()
: … { … }
SandboxFileSystemTestHelper::~SandboxFileSystemTestHelper() = default;
void SandboxFileSystemTestHelper::SetUp(const base::FilePath& base_dir) { … }
void SandboxFileSystemTestHelper::SetUp(
scoped_refptr<FileSystemContext> file_system_context) { … }
void SandboxFileSystemTestHelper::SetUp(
scoped_refptr<FileSystemContext> file_system_context,
const BucketLocator& bucket_locator) { … }
void SandboxFileSystemTestHelper::SetUp(
const base::FilePath& base_dir,
scoped_refptr<QuotaManagerProxy> quota_manager_proxy) { … }
void SandboxFileSystemTestHelper::TearDown() { … }
base::FilePath SandboxFileSystemTestHelper::GetRootPath() { … }
base::FilePath SandboxFileSystemTestHelper::GetLocalPath(
const base::FilePath& path) { … }
base::FilePath SandboxFileSystemTestHelper::GetLocalPathFromASCII(
const std::string& path) { … }
base::FileErrorOr<base::FilePath>
SandboxFileSystemTestHelper::GetUsageCachePath() const { … }
FileSystemURL SandboxFileSystemTestHelper::CreateURL(
const base::FilePath& path) const { … }
int64_t SandboxFileSystemTestHelper::GetCachedUsage() const { … }
int64_t SandboxFileSystemTestHelper::ComputeCurrentStorageKeyUsage() { … }
int64_t SandboxFileSystemTestHelper::ComputeCurrentDirectoryDatabaseUsage() { … }
FileSystemOperationRunner* SandboxFileSystemTestHelper::operation_runner() { … }
std::unique_ptr<FileSystemOperationContext>
SandboxFileSystemTestHelper::NewOperationContext() { … }
void SandboxFileSystemTestHelper::AddFileChangeObserver(
FileChangeObserver* observer) { … }
void SandboxFileSystemTestHelper::AddFileUpdateObserver(
FileUpdateObserver* observer) { … }
FileSystemUsageCache* SandboxFileSystemTestHelper::usage_cache() { … }
ObfuscatedFileUtilDelegate* SandboxFileSystemTestHelper::file_util_delegate() { … }
void SandboxFileSystemTestHelper::SetUpFileSystem() { … }
}