#include "content/browser/indexed_db/indexed_db_cursor.h"
#include <stddef.h>
#include <utility>
#include <vector>
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/notreached.h"
#include "base/trace_event/base_tracing.h"
#include "components/services/storage/public/cpp/buckets/bucket_locator.h"
#include "content/browser/indexed_db/indexed_db_callback_helpers.h"
#include "content/browser/indexed_db/indexed_db_database_error.h"
#include "content/browser/indexed_db/indexed_db_transaction.h"
#include "content/browser/indexed_db/indexed_db_value.h"
#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h"
#include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom.h"
IndexedDBKey;
namespace content {
namespace {
IndexedDBDatabaseError CreateCursorClosedError() { … }
IndexedDBDatabaseError CreateError(
blink::mojom::IDBException code,
const char* message,
base::WeakPtr<IndexedDBTransaction> transaction) { … }
}
IndexedDBCursor* IndexedDBCursor::CreateAndBind(
std::unique_ptr<IndexedDBBackingStore::Cursor> cursor,
indexed_db::CursorType cursor_type,
blink::mojom::IDBTaskType task_type,
base::WeakPtr<IndexedDBTransaction> transaction,
mojo::PendingAssociatedRemote<blink::mojom::IDBCursor>& pending_remote) { … }
IndexedDBCursor::IndexedDBCursor(
std::unique_ptr<IndexedDBBackingStore::Cursor> cursor,
indexed_db::CursorType cursor_type,
blink::mojom::IDBTaskType task_type,
base::WeakPtr<IndexedDBTransaction> transaction)
: … { … }
IndexedDBCursor::~IndexedDBCursor() { … }
void IndexedDBCursor::Advance(
uint32_t count,
blink::mojom::IDBCursor::AdvanceCallback callback) { … }
leveldb::Status IndexedDBCursor::AdvanceOperation(
uint32_t count,
blink::mojom::IDBCursor::AdvanceCallback callback,
IndexedDBTransaction* ) { … }
void IndexedDBCursor::Continue(
const IndexedDBKey& key,
const IndexedDBKey& primary_key,
blink::mojom::IDBCursor::ContinueCallback callback) { … }
leveldb::Status IndexedDBCursor::ContinueOperation(
std::unique_ptr<IndexedDBKey> key,
std::unique_ptr<IndexedDBKey> primary_key,
blink::mojom::IDBCursor::ContinueCallback callback,
IndexedDBTransaction* ) { … }
void IndexedDBCursor::Prefetch(
int number_to_fetch,
blink::mojom::IDBCursor::PrefetchCallback callback) { … }
leveldb::Status IndexedDBCursor::PrefetchIterationOperation(
int number_to_fetch,
blink::mojom::IDBCursor::PrefetchCallback callback,
IndexedDBTransaction* ) { … }
void IndexedDBCursor::PrefetchReset(int used_prefetches) { … }
void IndexedDBCursor::Close() { … }
}