#include "components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_transaction.h"
#include <utility>
#include "base/check_op.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_util.h"
#include "base/trace_event/trace_event.h"
#include "components/services/storage/indexed_db/scopes/leveldb_scope.h"
#include "components/services/storage/indexed_db/scopes/leveldb_scopes.h"
#include "components/services/storage/indexed_db/transactional_leveldb/leveldb_write_batch.h"
#include "components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_database.h"
#include "components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_iterator.h"
#include "third_party/leveldatabase/env_chromium.h"
#include "third_party/leveldatabase/src/include/leveldb/db.h"
#include "third_party/leveldatabase/src/include/leveldb/iterator.h"
namespace content {
TransactionalLevelDBTransaction::TransactionalLevelDBTransaction(
TransactionalLevelDBDatabase* db,
std::unique_ptr<LevelDBScope> scope)
: … { … }
TransactionalLevelDBTransaction::~TransactionalLevelDBTransaction() = default;
leveldb::Status TransactionalLevelDBTransaction::Put(std::string_view key,
std::string* value) { … }
leveldb::Status TransactionalLevelDBTransaction::Remove(std::string_view key) { … }
leveldb::Status TransactionalLevelDBTransaction::RemoveRange(
std::string_view begin,
std::string_view end,
LevelDBScopeDeletionMode deletion_mode) { … }
leveldb::Status TransactionalLevelDBTransaction::Get(std::string_view key,
std::string* value,
bool* found) { … }
leveldb::Status TransactionalLevelDBTransaction::Commit(bool sync_on_commit) { … }
void TransactionalLevelDBTransaction::Rollback() { … }
std::unique_ptr<TransactionalLevelDBIterator>
TransactionalLevelDBTransaction::CreateIterator(leveldb::Status& s) { … }
uint64_t TransactionalLevelDBTransaction::GetTransactionSize() const { … }
leveldb::Status TransactionalLevelDBTransaction::ForceWriteChangesAndUndoLog() { … }
void TransactionalLevelDBTransaction::OnIteratorLoaded(
TransactionalLevelDBIterator* iterator) { … }
void TransactionalLevelDBTransaction::OnIteratorEvicted(
TransactionalLevelDBIterator* iterator) { … }
void TransactionalLevelDBTransaction::OnIteratorDestroyed(
TransactionalLevelDBIterator* iterator) { … }
void TransactionalLevelDBTransaction::EvictLoadedIterators() { … }
LevelDBDirectTransaction::LevelDBDirectTransaction(
TransactionalLevelDBDatabase* db)
: … { … }
LevelDBDirectTransaction::~LevelDBDirectTransaction() = default;
leveldb::Status LevelDBDirectTransaction::Put(std::string_view key,
const std::string* value) { … }
leveldb::Status LevelDBDirectTransaction::Get(std::string_view key,
std::string* value,
bool* found) { … }
void LevelDBDirectTransaction::Remove(std::string_view key) { … }
leveldb::Status LevelDBDirectTransaction::Commit() { … }
}