Chromium Code Reviews| 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 5daf16d39dba037ad26fa7dc4c48c4f75b0a1864..b75d049597695f0ebab7d426f5c83cb4ba97de6a 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 { |
| @@ -61,7 +62,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; |
| } |
| @@ -78,7 +79,7 @@ void IndexedDBCursor::CursorIterationOperation( |
| !cursor_->Continue( |
| key.get(), primary_key.get(), IndexedDBBackingStore::Cursor::SEEK)) { |
| cursor_.reset(); |
| - callbacks->OnSuccess(static_cast<std::string*>(NULL)); |
| + callbacks->OnSuccess(static_cast<IndexedDBValue*>(NULL)); |
| return; |
| } |
| @@ -106,7 +107,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()); |
| @@ -124,12 +125,12 @@ void IndexedDBCursor::CursorPrefetchIterationOperation( |
| switch (cursor_type_) { |
| case indexed_db::CURSOR_KEY_ONLY: |
| - found_values.push_back(std::string()); |
| + 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(); |
|
jsbell
2013/12/18 23:04:40
We should include an estimate for the blob metadat
ericu
2013/12/19 05:19:11
Something like this?
IndexedDBValue::SizeEstimate
|
| found_values.push_back(value); |
| break; |
| } |
| @@ -144,7 +145,7 @@ void IndexedDBCursor::CursorPrefetchIterationOperation( |
| } |
| if (!found_keys.size()) { |
| - callbacks->OnSuccess(static_cast<std::string*>(NULL)); |
| + callbacks->OnSuccess(static_cast<IndexedDBValue*>(NULL)); |
| return; |
| } |