diff options
author | Zeno Albisser <zeno.albisser@theqtcompany.com> | 2014-12-05 15:04:29 +0100 |
---|---|---|
committer | Andras Becsi <andras.becsi@theqtcompany.com> | 2014-12-09 10:49:28 +0100 |
commit | af6588f8d723931a298c995fa97259bb7f7deb55 (patch) | |
tree | 060ca707847ba1735f01af2372e0d5e494dc0366 /chromium/content/browser/indexed_db/indexed_db_database.h | |
parent | 2fff84d821cc7b1c785f6404e0f8091333283e74 (diff) | |
download | qtwebengine-chromium-af6588f8d723931a298c995fa97259bb7f7deb55.tar.gz |
BASELINE: Update chromium to 40.0.2214.28 and ninja to 1.5.3.
Change-Id: I759465284fd64d59ad120219cbe257f7402c4181
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'chromium/content/browser/indexed_db/indexed_db_database.h')
-rw-r--r-- | chromium/content/browser/indexed_db/indexed_db_database.h | 48 |
1 files changed, 21 insertions, 27 deletions
diff --git a/chromium/content/browser/indexed_db/indexed_db_database.h b/chromium/content/browser/indexed_db/indexed_db_database.h index 63a438a4bb6..bcde7190c50 100644 --- a/chromium/content/browser/indexed_db/indexed_db_database.h +++ b/chromium/content/browser/indexed_db/indexed_db_database.h @@ -20,6 +20,7 @@ #include "content/browser/indexed_db/indexed_db_pending_connection.h" #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h" #include "content/browser/indexed_db/list_set.h" +#include "third_party/WebKit/public/platform/WebIDBTypes.h" #include "url/gurl.h" namespace content { @@ -37,17 +38,6 @@ struct IndexedDBValue; class CONTENT_EXPORT IndexedDBDatabase : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) { public: - enum TaskType { - NORMAL_TASK = 0, - PREEMPTIVE_TASK - }; - - enum PutMode { - ADD_OR_UPDATE, - ADD_ONLY, - CURSOR_UPDATE - }; - // An index and corresponding set of keys typedef std::pair<int64, std::vector<IndexedDBKey> > IndexKeys; @@ -91,10 +81,15 @@ class CONTENT_EXPORT IndexedDBDatabase void CreateTransaction(int64 transaction_id, IndexedDBConnection* connection, const std::vector<int64>& object_store_ids, - uint16 mode); + blink::WebIDBTransactionMode mode); void Close(IndexedDBConnection* connection, bool forced); void ForceClose(); + // Ack that one of the connections notified with a "versionchange" event did + // not promptly close. Therefore a "blocked" event should be fired at the + // pending connection. + void VersionChangeIgnored(); + void Commit(int64 transaction_id); void Abort(int64 transaction_id); void Abort(int64 transaction_id, const IndexedDBDatabaseError& error); @@ -119,7 +114,7 @@ class CONTENT_EXPORT IndexedDBDatabase void TransactionFinished(IndexedDBTransaction* transaction, bool committed); // Called by transactions to report failure committing to the backing store. - void TransactionCommitFailed(); + void TransactionCommitFailed(const leveldb::Status& status); void Get(int64 transaction_id, int64 object_store_id, @@ -130,9 +125,9 @@ class CONTENT_EXPORT IndexedDBDatabase void Put(int64 transaction_id, int64 object_store_id, IndexedDBValue* value, - ScopedVector<webkit_blob::BlobDataHandle>* handles, + ScopedVector<storage::BlobDataHandle>* handles, scoped_ptr<IndexedDBKey> key, - PutMode mode, + blink::WebIDBPutMode mode, scoped_refptr<IndexedDBCallbacks> callbacks, const std::vector<IndexKeys>& index_keys); void SetIndexKeys(int64 transaction_id, @@ -146,9 +141,9 @@ class CONTENT_EXPORT IndexedDBDatabase int64 object_store_id, int64 index_id, scoped_ptr<IndexedDBKeyRange> key_range, - indexed_db::CursorDirection, + blink::WebIDBCursorDirection, bool key_only, - TaskType task_type, + blink::WebIDBTaskType task_type, scoped_refptr<IndexedDBCallbacks> callbacks); void Count(int64 transaction_id, int64 object_store_id, @@ -229,6 +224,15 @@ class CONTENT_EXPORT IndexedDBDatabase private: friend class base::RefCounted<IndexedDBDatabase>; + class PendingDeleteCall; + class PendingSuccessCall; + class PendingUpgradeCall; + + typedef std::map<int64, IndexedDBTransaction*> TransactionMap; + typedef std::list<IndexedDBPendingConnection> PendingOpenCallList; + typedef std::list<PendingDeleteCall*> PendingDeleteCallList; + typedef list_set<IndexedDBConnection*> ConnectionSet; + IndexedDBDatabase(const base::string16& name, IndexedDBBackingStore* backing_store, IndexedDBFactory* factory, @@ -273,22 +277,12 @@ class CONTENT_EXPORT IndexedDBDatabase IndexedDBTransactionCoordinator transaction_coordinator_; - typedef std::map<int64, IndexedDBTransaction*> TransactionMap; TransactionMap transactions_; - - typedef std::list<IndexedDBPendingConnection> PendingOpenCallList; PendingOpenCallList pending_open_calls_; - - class PendingUpgradeCall; scoped_ptr<PendingUpgradeCall> pending_run_version_change_transaction_call_; - class PendingSuccessCall; scoped_ptr<PendingSuccessCall> pending_second_half_open_; - - class PendingDeleteCall; - typedef std::list<PendingDeleteCall*> PendingDeleteCallList; PendingDeleteCallList pending_delete_calls_; - typedef list_set<IndexedDBConnection*> ConnectionSet; ConnectionSet connections_; DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase); |