chromium/content/browser/indexed_db/indexed_db_cursor.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {
// This should never be script visible: the cursor should either be closed when
// it hits the end of the range (and script throws an error before the call
// could be made), if the transaction has finished (ditto), or if there's an
// incoming request from the front end but the transaction has aborted on the
// back end; in that case the tx will already have sent an abort to the request
// so this would be ignored.
IndexedDBDatabaseError CreateCursorClosedError() {}

IndexedDBDatabaseError CreateError(
    blink::mojom::IDBException code,
    const char* message,
    base::WeakPtr<IndexedDBTransaction> transaction) {}

}  // namespace

// static
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* /*transaction*/) {}

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* /*transaction*/) {}

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* /*transaction*/) {}

void IndexedDBCursor::PrefetchReset(int used_prefetches) {}

void IndexedDBCursor::Close() {}

}  // namespace content