| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 bool force_close) override; | 108 bool force_close) override; |
| 109 void AbortTransactionsAndCompactDatabase( | 109 void AbortTransactionsAndCompactDatabase( |
| 110 const url::Origin& origin, | 110 const url::Origin& origin, |
| 111 AbortTransactionsAndCompactDatabaseCallback callback) override; | 111 AbortTransactionsAndCompactDatabaseCallback callback) override; |
| 112 void AbortTransactionsForDatabase( | 112 void AbortTransactionsForDatabase( |
| 113 const url::Origin& origin, | 113 const url::Origin& origin, |
| 114 AbortTransactionsForDatabaseCallback callback) override; | 114 AbortTransactionsForDatabaseCallback callback) override; |
| 115 | 115 |
| 116 void InvalidateWeakPtrsAndClearBindings(); | 116 void InvalidateWeakPtrsAndClearBindings(); |
| 117 | 117 |
| 118 base::SequencedTaskRunner* IDBTaskRunner() const; |
| 119 |
| 118 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; | 120 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; |
| 119 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 121 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
| 120 scoped_refptr<base::SequencedTaskRunner> idb_runner_; | |
| 121 | 122 |
| 122 // Maps blob uuid to a pair (handle, ref count). Entry is added and/or count | 123 // Maps blob uuid to a pair (handle, ref count). Entry is added and/or count |
| 123 // is incremented in HoldBlobData(), and count is decremented and/or entry | 124 // is incremented in HoldBlobData(), and count is decremented and/or entry |
| 124 // removed in DropBlobData(). | 125 // removed in DropBlobData(). |
| 125 std::map<std::string, | 126 std::map<std::string, |
| 126 std::pair<std::unique_ptr<storage::BlobDataHandle>, int>> | 127 std::pair<std::unique_ptr<storage::BlobDataHandle>, int>> |
| 127 blob_data_handle_map_; | 128 blob_data_handle_map_; |
| 128 | 129 |
| 129 // Used to set file permissions for blob storage. | 130 // Used to set file permissions for blob storage. |
| 130 const int ipc_process_id_; | 131 const int ipc_process_id_; |
| 131 | 132 |
| 132 mojo::AssociatedBindingSet<::indexed_db::mojom::Factory> bindings_; | 133 mojo::AssociatedBindingSet<::indexed_db::mojom::Factory> bindings_; |
| 133 | 134 |
| 134 mojo::StrongAssociatedBindingSet<::indexed_db::mojom::Database> | 135 mojo::StrongAssociatedBindingSet<::indexed_db::mojom::Database> |
| 135 database_bindings_; | 136 database_bindings_; |
| 136 | 137 |
| 137 mojo::StrongAssociatedBindingSet<::indexed_db::mojom::Cursor> | 138 mojo::StrongAssociatedBindingSet<::indexed_db::mojom::Cursor> |
| 138 cursor_bindings_; | 139 cursor_bindings_; |
| 139 | 140 |
| 140 IDBSequenceHelper* idb_helper_; | 141 IDBSequenceHelper* idb_helper_; |
| 141 | 142 |
| 142 base::WeakPtrFactory<IndexedDBDispatcherHost> weak_factory_; | 143 base::WeakPtrFactory<IndexedDBDispatcherHost> weak_factory_; |
| 143 | 144 |
| 144 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); | 145 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); |
| 145 }; | 146 }; |
| 146 | 147 |
| 147 } // namespace content | 148 } // namespace content |
| 148 | 149 |
| 149 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ | 150 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ |
| OLD | NEW |