| 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 a7d5da06d2b04fdc8ba03223d15490f581a5717e..c38ef19e5662e6ad12e4fa3e1fac333593c771d9 100644
|
| --- a/content/browser/indexed_db/indexed_db_database.cc
|
| +++ b/content/browser/indexed_db/indexed_db_database.cc
|
| @@ -27,6 +27,7 @@
|
| #include "content/common/indexed_db/indexed_db_key_path.h"
|
| #include "content/common/indexed_db/indexed_db_key_range.h"
|
| #include "third_party/WebKit/public/platform/WebIDBDatabaseException.h"
|
| +#include "third_party/leveldatabase/env_chromium.h"
|
| #include "webkit/browser/blob/blob_data_handle.h"
|
|
|
| using base::ASCIIToUTF16;
|
| @@ -300,7 +301,7 @@ void IndexedDBDatabase::CreateObjectStore(int64 transaction_id,
|
| ASCIIToUTF16("Internal error creating object store '") +
|
| object_store_metadata.name + ASCIIToUTF16("'."));
|
| transaction->Abort(error);
|
| - if (s.IsCorruption())
|
| + if (leveldb_env::IsCorruption(s))
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| return;
|
| @@ -424,7 +425,7 @@ void IndexedDBDatabase::DeleteIndexOperation(
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| error_string);
|
| transaction->Abort(error);
|
| - if (s.IsCorruption())
|
| + if (leveldb_env::IsCorruption(s))
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| return;
|
| @@ -557,7 +558,7 @@ void IndexedDBDatabase::GetOperation(
|
| DLOG(ERROR) << "Unable to open cursor operation: " << s.ToString();
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| "Internal error deleting data in range");
|
| - if (s.IsCorruption()) {
|
| + if (leveldb_env::IsCorruption(s)) {
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| }
|
| @@ -585,7 +586,7 @@ void IndexedDBDatabase::GetOperation(
|
| "Internal error in GetRecord.");
|
| callbacks->OnError(error);
|
|
|
| - if (s.IsCorruption())
|
| + if (leveldb_env::IsCorruption(s))
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| return;
|
| @@ -618,7 +619,7 @@ void IndexedDBDatabase::GetOperation(
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| "Internal error in GetPrimaryKeyViaIndex.");
|
| callbacks->OnError(error);
|
| - if (s.IsCorruption())
|
| + if (leveldb_env::IsCorruption(s))
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| return;
|
| @@ -644,7 +645,7 @@ void IndexedDBDatabase::GetOperation(
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| "Internal error in GetRecord.");
|
| callbacks->OnError(error);
|
| - if (s.IsCorruption())
|
| + if (leveldb_env::IsCorruption(s))
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| return;
|
| @@ -790,7 +791,7 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params,
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| "Internal error checking key existence.");
|
| params->callbacks->OnError(error);
|
| - if (s.IsCorruption())
|
| + if (leveldb_env::IsCorruption(s))
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| return;
|
| @@ -843,7 +844,7 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params,
|
| blink::WebIDBDatabaseExceptionUnknownError,
|
| "Internal error: backing store error performing put/add.");
|
| params->callbacks->OnError(error);
|
| - if (s.IsCorruption())
|
| + if (leveldb_env::IsCorruption(s))
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| return;
|
| @@ -871,7 +872,7 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params,
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| "Internal error updating key generator.");
|
| params->callbacks->OnError(error);
|
| - if (s.IsCorruption())
|
| + if (leveldb_env::IsCorruption(s))
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| return;
|
| @@ -906,7 +907,7 @@ void IndexedDBDatabase::SetIndexKeys(int64 transaction_id,
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| "Internal error setting index keys.");
|
| transaction->Abort(error);
|
| - if (s.IsCorruption())
|
| + if (leveldb_env::IsCorruption(s))
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| return;
|
| @@ -1085,7 +1086,7 @@ void IndexedDBDatabase::OpenCursorOperation(
|
| DLOG(ERROR) << "Unable to open cursor operation: " << s.ToString();
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| "Internal error opening cursor operation");
|
| - if (s.IsCorruption()) {
|
| + if (leveldb_env::IsCorruption(s)) {
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| }
|
| @@ -1160,7 +1161,7 @@ void IndexedDBDatabase::CountOperation(
|
| DLOG(ERROR) << "Unable perform count operation: " << s.ToString();
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| "Internal error performing count operation");
|
| - if (s.IsCorruption()) {
|
| + if (leveldb_env::IsCorruption(s)) {
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| }
|
| @@ -1235,7 +1236,7 @@ void IndexedDBDatabase::DeleteRangeOperation(
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| ASCIIToUTF16("Internal error deleting range"));
|
| transaction->Abort(error);
|
| - if (s.IsCorruption()) {
|
| + if (leveldb_env::IsCorruption(s)) {
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| }
|
| @@ -1272,7 +1273,7 @@ void IndexedDBDatabase::ClearOperation(
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| "Internal error clearing object store");
|
| callbacks->OnError(error);
|
| - if (s.IsCorruption()) {
|
| + if (leveldb_env::IsCorruption(s)) {
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| }
|
| @@ -1299,7 +1300,7 @@ void IndexedDBDatabase::DeleteObjectStoreOperation(
|
| IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
|
| error_string);
|
| transaction->Abort(error);
|
| - if (s.IsCorruption())
|
| + if (leveldb_env::IsCorruption(s))
|
| factory_->HandleBackingStoreCorruption(backing_store_->origin_url(),
|
| error);
|
| return;
|
|
|