| 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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 database_id, | 711 database_id, |
| 712 object_store_id, | 712 object_store_id, |
| 713 static_cast<int64>(floor(key.number())) + 1, | 713 static_cast<int64>(floor(key.number())) + 1, |
| 714 check_current); | 714 check_current); |
| 715 } | 715 } |
| 716 | 716 |
| 717 struct IndexedDBDatabase::PutOperationParams { | 717 struct IndexedDBDatabase::PutOperationParams { |
| 718 PutOperationParams() {} | 718 PutOperationParams() {} |
| 719 int64 object_store_id; | 719 int64 object_store_id; |
| 720 IndexedDBValue value; | 720 IndexedDBValue value; |
| 721 ScopedVector<webkit_blob::BlobDataHandle> handles; | 721 ScopedVector<storage::BlobDataHandle> handles; |
| 722 scoped_ptr<IndexedDBKey> key; | 722 scoped_ptr<IndexedDBKey> key; |
| 723 blink::WebIDBPutMode put_mode; | 723 blink::WebIDBPutMode put_mode; |
| 724 scoped_refptr<IndexedDBCallbacks> callbacks; | 724 scoped_refptr<IndexedDBCallbacks> callbacks; |
| 725 std::vector<IndexKeys> index_keys; | 725 std::vector<IndexKeys> index_keys; |
| 726 | 726 |
| 727 private: | 727 private: |
| 728 DISALLOW_COPY_AND_ASSIGN(PutOperationParams); | 728 DISALLOW_COPY_AND_ASSIGN(PutOperationParams); |
| 729 }; | 729 }; |
| 730 | 730 |
| 731 void IndexedDBDatabase::Put(int64 transaction_id, | 731 void IndexedDBDatabase::Put(int64 transaction_id, |
| 732 int64 object_store_id, | 732 int64 object_store_id, |
| 733 IndexedDBValue* value, | 733 IndexedDBValue* value, |
| 734 ScopedVector<webkit_blob::BlobDataHandle>* handles, | 734 ScopedVector<storage::BlobDataHandle>* handles, |
| 735 scoped_ptr<IndexedDBKey> key, | 735 scoped_ptr<IndexedDBKey> key, |
| 736 blink::WebIDBPutMode put_mode, | 736 blink::WebIDBPutMode put_mode, |
| 737 scoped_refptr<IndexedDBCallbacks> callbacks, | 737 scoped_refptr<IndexedDBCallbacks> callbacks, |
| 738 const std::vector<IndexKeys>& index_keys) { | 738 const std::vector<IndexKeys>& index_keys) { |
| 739 IDB_TRACE1("IndexedDBDatabase::Put", "txn.id", transaction_id); | 739 IDB_TRACE1("IndexedDBDatabase::Put", "txn.id", transaction_id); |
| 740 IndexedDBTransaction* transaction = GetTransaction(transaction_id); | 740 IndexedDBTransaction* transaction = GetTransaction(transaction_id); |
| 741 if (!transaction) | 741 if (!transaction) |
| 742 return; | 742 return; |
| 743 DCHECK_NE(transaction->mode(), blink::WebIDBTransactionModeReadOnly); | 743 DCHECK_NE(transaction->mode(), blink::WebIDBTransactionModeReadOnly); |
| 744 | 744 |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1781 IndexedDBTransaction* transaction) { | 1781 IndexedDBTransaction* transaction) { |
| 1782 DCHECK(!transaction); | 1782 DCHECK(!transaction); |
| 1783 IDB_TRACE1("IndexedDBDatabase::VersionChangeAbortOperation", | 1783 IDB_TRACE1("IndexedDBDatabase::VersionChangeAbortOperation", |
| 1784 "txn.id", | 1784 "txn.id", |
| 1785 transaction->id()); | 1785 transaction->id()); |
| 1786 metadata_.version = previous_version; | 1786 metadata_.version = previous_version; |
| 1787 metadata_.int_version = previous_int_version; | 1787 metadata_.int_version = previous_int_version; |
| 1788 } | 1788 } |
| 1789 | 1789 |
| 1790 } // namespace content | 1790 } // namespace content |
| OLD | NEW |