#include "components/media_device_salt/media_device_salt_database.h"
#include <vector>
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "sql/meta_table.h"
#include "sql/recovery.h"
#include "sql/statement.h"
#include "sql/transaction.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
namespace media_device_salt {
namespace {
constexpr int kCurrentVersion = …;
constexpr int kCompatibleVersion = …;
}
std::string CreateRandomSalt() { … }
MediaDeviceSaltDatabase::MediaDeviceSaltDatabase(const base::FilePath& db_path)
: … { … }
std::optional<std::string> MediaDeviceSaltDatabase::GetOrInsertSalt(
const blink::StorageKey& storage_key,
std::optional<std::string> candidate_salt) { … }
void MediaDeviceSaltDatabase::DeleteEntries(
base::Time delete_begin,
base::Time delete_end,
content::StoragePartition::StorageKeyMatcherFunction matcher) { … }
void MediaDeviceSaltDatabase::DeleteEntry(
const blink::StorageKey& storage_key) { … }
std::vector<blink::StorageKey> MediaDeviceSaltDatabase::GetAllStorageKeys() { … }
bool MediaDeviceSaltDatabase::EnsureOpen(bool is_retry) { … }
void MediaDeviceSaltDatabase::OnDatabaseError(int error,
sql::Statement* statement) { … }
}