#include "components/services/storage/dom_storage/storage_area_test_util.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
namespace storage {
namespace test {
namespace {
void SuccessCallback(base::OnceClosure callback,
bool* success_out,
bool success) { … }
}
base::OnceCallback<void(bool)> MakeSuccessCallback(base::OnceClosure callback,
bool* success_out) { … }
bool PutSync(blink::mojom::StorageArea* area,
const std::vector<uint8_t>& key,
const std::vector<uint8_t>& value,
const std::optional<std::vector<uint8_t>>& old_value,
const std::string& source) { … }
bool GetSync(blink::mojom::StorageArea* area,
const std::vector<uint8_t>& key,
std::vector<uint8_t>* data_out) { … }
bool GetAllSync(blink::mojom::StorageArea* area,
std::vector<blink::mojom::KeyValuePtr>* data_out) { … }
bool DeleteSync(blink::mojom::StorageArea* area,
const std::vector<uint8_t>& key,
const std::optional<std::vector<uint8_t>>& client_old_value,
const std::string& source) { … }
bool DeleteAllSync(blink::mojom::StorageArea* area, const std::string& source) { … }
blink::mojom::StorageArea::GetAllCallback MakeGetAllCallback(
base::OnceClosure callback,
std::vector<blink::mojom::KeyValuePtr>* data_out) { … }
MockLevelDBObserver::MockLevelDBObserver() = default;
MockLevelDBObserver::~MockLevelDBObserver() = default;
mojo::PendingRemote<blink::mojom::StorageAreaObserver>
MockLevelDBObserver::Bind() { … }
}
}