| 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 c686ae87ad3aaa4a86d13e948f644c1f0c8265ba..11054433af2c55b1c352ba1e44df5c3440017823 100644
|
| --- a/content/browser/indexed_db/indexed_db_database.cc
|
| +++ b/content/browser/indexed_db/indexed_db_database.cc
|
| @@ -17,6 +17,7 @@
|
| #include "base/memory/ptr_util.h"
|
| #include "base/memory/scoped_vector.h"
|
| #include "base/metrics/histogram_macros.h"
|
| +#include "base/numerics/safe_conversions.h"
|
| #include "base/stl_util.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| @@ -1410,13 +1411,12 @@ void IndexedDBDatabase::DeleteRangeOperation(
|
| std::unique_ptr<IndexedDBKeyRange> key_range,
|
| scoped_refptr<IndexedDBCallbacks> callbacks,
|
| IndexedDBTransaction* transaction) {
|
| - IDB_TRACE1(
|
| - "IndexedDBDatabase::DeleteRangeOperation", "txn.id", transaction->id());
|
| + IDB_TRACE1("IndexedDBDatabase::DeleteRangeOperation", "txn.id",
|
| + transaction->id());
|
| + size_t delete_count = 0;
|
| leveldb::Status s =
|
| - backing_store_->DeleteRange(transaction->BackingStoreTransaction(),
|
| - id(),
|
| - object_store_id,
|
| - *key_range);
|
| + backing_store_->DeleteRange(transaction->BackingStoreTransaction(), id(),
|
| + object_store_id, *key_range, &delete_count);
|
| if (!s.ok()) {
|
| base::string16 error_string =
|
| ASCIIToUTF16("Internal error deleting data in range");
|
| @@ -1428,7 +1428,7 @@ void IndexedDBDatabase::DeleteRangeOperation(
|
| }
|
| return;
|
| }
|
| - callbacks->OnSuccess();
|
| + callbacks->OnSuccess(base::checked_cast<int64_t>(delete_count));
|
| }
|
|
|
| void IndexedDBDatabase::Clear(int64_t transaction_id,
|
|
|