Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1653)

Unified Diff: content/browser/indexed_db/indexed_db_database.cc

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged out--bot failed due to staleness. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 c38ef19e5662e6ad12e4fa3e1fac333593c771d9..5ba4e4839e70b7c91c417f7d538a2c43a9e62dcf 100644
--- a/content/browser/indexed_db/indexed_db_database.cc
+++ b/content/browser/indexed_db/indexed_db_database.cc
@@ -1207,34 +1207,16 @@ 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));
- }
-
+ leveldb::Status s =
+ backing_store_->DeleteRange(transaction->BackingStoreTransaction(),
+ id(),
+ object_store_id,
+ *key_range);
if (!s.ok()) {
+ base::string16 error_string =
+ ASCIIToUTF16("Internal error deleting data in range");
IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
- ASCIIToUTF16("Internal error deleting range"));
+ error_string);
transaction->Abort(error);
if (leveldb_env::IsCorruption(s)) {
factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
@@ -1242,7 +1224,6 @@ void IndexedDBDatabase::DeleteRangeOperation(
}
return;
}
-
callbacks->OnSuccess();
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_context_impl.cc ('k') | content/browser/indexed_db/indexed_db_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698