Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: content/browser/indexed_db/indexed_db_dispatcher_host.h

Issue 2930183002: Let IndexedDBContextImpl create its own task runner (Closed)
Patch Set: rebased Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_context_impl.cc ('k') | content/browser/indexed_db/indexed_db_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698