OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/indexed_db/indexed_db_database.h" | 5 #include "content/browser/indexed_db/indexed_db_database.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 return; | 841 return; |
842 } | 842 } |
843 | 843 |
844 // Before this point, don't do any mutation. After this point, rollback the | 844 // Before this point, don't do any mutation. After this point, rollback the |
845 // transaction in case of error. | 845 // transaction in case of error. |
846 leveldb::Status s = | 846 leveldb::Status s = |
847 backing_store_->PutRecord(transaction->BackingStoreTransaction(), | 847 backing_store_->PutRecord(transaction->BackingStoreTransaction(), |
848 id(), | 848 id(), |
849 params->object_store_id, | 849 params->object_store_id, |
850 *key, | 850 *key, |
851 params->value, | 851 ¶ms->value, |
852 ¶ms->handles, | 852 ¶ms->handles, |
853 &record_identifier); | 853 &record_identifier); |
854 if (!s.ok()) { | 854 if (!s.ok()) { |
855 IndexedDBDatabaseError error( | 855 IndexedDBDatabaseError error( |
856 blink::WebIDBDatabaseExceptionUnknownError, | 856 blink::WebIDBDatabaseExceptionUnknownError, |
857 "Internal error: backing store error performing put/add."); | 857 "Internal error: backing store error performing put/add."); |
858 params->callbacks->OnError(error); | 858 params->callbacks->OnError(error); |
859 if (leveldb_env::IsCorruption(s)) | 859 if (leveldb_env::IsCorruption(s)) |
860 factory_->HandleBackingStoreCorruption(backing_store_->origin_url(), | 860 factory_->HandleBackingStoreCorruption(backing_store_->origin_url(), |
861 error); | 861 error); |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1789 IndexedDBTransaction* transaction) { | 1789 IndexedDBTransaction* transaction) { |
1790 DCHECK(!transaction); | 1790 DCHECK(!transaction); |
1791 IDB_TRACE1("IndexedDBDatabase::VersionChangeAbortOperation", | 1791 IDB_TRACE1("IndexedDBDatabase::VersionChangeAbortOperation", |
1792 "txn.id", | 1792 "txn.id", |
1793 transaction->id()); | 1793 transaction->id()); |
1794 metadata_.version = previous_version; | 1794 metadata_.version = previous_version; |
1795 metadata_.int_version = previous_int_version; | 1795 metadata_.int_version = previous_int_version; |
1796 } | 1796 } |
1797 | 1797 |
1798 } // namespace content | 1798 } // namespace content |
OLD | NEW |