#include "components/services/storage/storage_service_impl.h"
#include "base/functional/bind.h"
#include "base/task/sequenced_task_runner.h"
#include "build/build_config.h"
#include "components/services/storage/dom_storage/storage_area_impl.h"
#include "components/services/storage/filesystem_proxy_factory.h"
#include "components/services/storage/partition_impl.h"
#include "components/services/storage/public/cpp/filesystem/filesystem_proxy.h"
#include "components/services/storage/sandboxed_vfs_delegate.h"
#include "components/services/storage/test_api_stubs.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "sql/database.h"
#include "sql/sandboxed_vfs.h"
#include "third_party/leveldatabase/env_chromium.h"
namespace storage {
namespace {
#if !BUILDFLAG(IS_ANDROID)
constexpr char kVfsName[] = …;
DirectoryBinder;
std::unique_ptr<FilesystemProxy> CreateRestrictedFilesystemProxy(
const base::FilePath& directory_path,
scoped_refptr<base::SequencedTaskRunner> io_task_runner,
DirectoryBinder binder,
scoped_refptr<base::SequencedTaskRunner> binder_task_runner) { … }
#endif
}
StorageServiceImpl::StorageServiceImpl(
mojo::PendingReceiver<mojom::StorageService> receiver,
scoped_refptr<base::SequencedTaskRunner> io_task_runner)
: … { … }
StorageServiceImpl::~StorageServiceImpl() = default;
void StorageServiceImpl::EnableAggressiveDomStorageFlushing() { … }
#if !BUILDFLAG(IS_ANDROID)
void StorageServiceImpl::SetDataDirectory(
const base::FilePath& path,
mojo::PendingRemote<mojom::Directory> directory) { … }
#endif
void StorageServiceImpl::BindPartition(
const std::optional<base::FilePath>& path,
mojo::PendingReceiver<mojom::Partition> receiver) { … }
void StorageServiceImpl::BindTestApi(
mojo::ScopedMessagePipeHandle test_api_receiver) { … }
void StorageServiceImpl::RemovePartition(PartitionImpl* partition) { … }
#if !BUILDFLAG(IS_ANDROID)
void StorageServiceImpl::BindDataDirectoryReceiver(
mojo::PendingReceiver<mojom::Directory> receiver) { … }
#endif
}