| Index: content/browser/indexed_db/indexed_db_cursor.cc
|
| diff --git a/content/browser/indexed_db/indexed_db_cursor.cc b/content/browser/indexed_db/indexed_db_cursor.cc
|
| index cb254d95908627d3069acea41b8ed3ded9ef01dc..2d3a1ae4a72a6b82d4085e7a7e091cf325bce94d 100644
|
| --- a/content/browser/indexed_db/indexed_db_cursor.cc
|
| +++ b/content/browser/indexed_db/indexed_db_cursor.cc
|
| @@ -10,6 +10,7 @@
|
| #include "content/browser/indexed_db/indexed_db_database_error.h"
|
| #include "content/browser/indexed_db/indexed_db_tracing.h"
|
| #include "content/browser/indexed_db/indexed_db_transaction.h"
|
| +#include "content/browser/indexed_db/indexed_db_value.h"
|
|
|
| namespace content {
|
|
|
| @@ -59,7 +60,7 @@ void IndexedDBCursor::CursorAdvanceOperation(
|
| IDB_TRACE("IndexedDBCursor::CursorAdvanceOperation");
|
| if (!cursor_ || !cursor_->Advance(count)) {
|
| cursor_.reset();
|
| - callbacks->OnSuccess(static_cast<std::string*>(NULL));
|
| + callbacks->OnSuccess(static_cast<IndexedDBValue*>(NULL));
|
| return;
|
| }
|
|
|
| @@ -74,7 +75,7 @@ void IndexedDBCursor::CursorIterationOperation(
|
| if (!cursor_ ||
|
| !cursor_->Continue(key.get(), IndexedDBBackingStore::Cursor::SEEK)) {
|
| cursor_.reset();
|
| - callbacks->OnSuccess(static_cast<std::string*>(NULL));
|
| + callbacks->OnSuccess(static_cast<IndexedDBValue*>(NULL));
|
| return;
|
| }
|
|
|
| @@ -102,7 +103,7 @@ void IndexedDBCursor::CursorPrefetchIterationOperation(
|
|
|
| std::vector<IndexedDBKey> found_keys;
|
| std::vector<IndexedDBKey> found_primary_keys;
|
| - std::vector<std::string> found_values;
|
| + std::vector<IndexedDBValue> found_values;
|
|
|
| if (cursor_)
|
| saved_cursor_.reset(cursor_->Clone());
|
| @@ -120,12 +121,13 @@ void IndexedDBCursor::CursorPrefetchIterationOperation(
|
|
|
| switch (cursor_type_) {
|
| case indexed_db::CURSOR_KEY_ONLY:
|
| - found_values.push_back(std::string());
|
| + // TODO: Can we skip this?
|
| + found_values.push_back(IndexedDBValue());
|
| break;
|
| case indexed_db::CURSOR_KEY_AND_VALUE: {
|
| - std::string value;
|
| + IndexedDBValue value;
|
| value.swap(*cursor_->Value());
|
| - size_estimate += value.size();
|
| + size_estimate += value.bits.size();
|
| found_values.push_back(value);
|
| break;
|
| }
|
| @@ -140,7 +142,7 @@ void IndexedDBCursor::CursorPrefetchIterationOperation(
|
| }
|
|
|
| if (!found_keys.size()) {
|
| - callbacks->OnSuccess(static_cast<std::string*>(NULL));
|
| + callbacks->OnSuccess(static_cast<IndexedDBValue*>(NULL));
|
| return;
|
| }
|
|
|
|
|