Index: content/browser/indexed_db/indexed_db_database.cc |
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc |
index 1d9ccbbc5f273bfda9efabeb901453c50a71a0da..4e62a08e2c7cfcc023a5a2b3c2f50074b6de0aff 100644 |
--- a/content/browser/indexed_db/indexed_db_database.cc |
+++ b/content/browser/indexed_db/indexed_db_database.cc |
@@ -6,6 +6,7 @@ |
#include <math.h> |
#include <set> |
+#include <vector> |
#include "base/auto_reset.h" |
#include "base/logging.h" |
@@ -1223,42 +1224,15 @@ void IndexedDBDatabase::DeleteRangeOperation( |
scoped_refptr<IndexedDBCallbacks> callbacks, |
IndexedDBTransaction* transaction) { |
IDB_TRACE("IndexedDBDatabase::DeleteRangeOperation"); |
- leveldb::Status s; |
- scoped_ptr<IndexedDBBackingStore::Cursor> backing_store_cursor = |
- backing_store_->OpenObjectStoreCursor( |
- transaction->BackingStoreTransaction(), |
- id(), |
- object_store_id, |
- *key_range, |
- indexed_db::CURSOR_NEXT, |
- &s); |
- if (backing_store_cursor && s.ok()) { |
- do { |
- if (!backing_store_->DeleteRecord( |
- transaction->BackingStoreTransaction(), |
- id(), |
- object_store_id, |
- backing_store_cursor->record_identifier()) |
- .ok()) { |
- callbacks->OnError( |
- IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, |
- "Internal error deleting data in range")); |
- return; |
- } |
- } while (backing_store_cursor->Continue(&s)); |
- } |
- |
- if (!s.ok()) { |
- IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError, |
- ASCIIToUTF16("Internal error deleting range")); |
- transaction->Abort(error); |
- if (s.IsCorruption()) { |
- factory_->HandleBackingStoreCorruption(backing_store_->origin_url(), |
- error); |
- } |
+ if (!backing_store_->DeleteRange(transaction->BackingStoreTransaction(), |
+ id(), |
+ object_store_id, |
+ *key_range).ok()) { |
+ callbacks->OnError( |
+ IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, |
+ "Internal error deleting data in range")); |
return; |
} |
- |
callbacks->OnSuccess(); |
} |