#include "components/services/storage/test_api/test_api.h"
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/immediate_crash.h"
#include "base/no_destructor.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "components/services/storage/filesystem_proxy_factory.h"
#include "components/services/storage/public/mojom/test_api.test-mojom.h"
#include "components/services/storage/test_api_stubs.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "third_party/leveldatabase/env_chromium.h"
#include "third_party/leveldatabase/src/include/leveldb/db.h"
namespace storage {
namespace {
class TestApiDatabaseEnv : public leveldb_env::ChromiumEnv { … };
TestApiDatabaseEnv* GetTestApiDatabaseEnv() { … }
void CreateAndCompactDatabase(
const std::string& name,
scoped_refptr<base::SequencedTaskRunner> callback_task_runner,
mojom::TestApi::ForceLeveldbDatabaseCompactionCallback callback) { … }
class TestApiImpl : public mojom::TestApi { … };
void BindTestApi(mojo::ScopedMessagePipeHandle test_api_receiver) { … }
}
void InjectTestApiImplementation() { … }
}