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

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: Use ScopedTaskEnvironment for most tests Created 3 years, 6 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 int64_t version, 102 int64_t version,
103 int64_t transaction_id) override; 103 int64_t transaction_id) override;
104 void DeleteDatabase( 104 void DeleteDatabase(
105 ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info, 105 ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info,
106 const url::Origin& origin, 106 const url::Origin& origin,
107 const base::string16& name, 107 const base::string16& name,
108 bool force_close) override; 108 bool force_close) override;
109 109
110 void InvalidateWeakPtrsAndClearBindings(); 110 void InvalidateWeakPtrsAndClearBindings();
111 111
112 base::SequencedTaskRunner* IDBTaskRunner() const;
113
112 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; 114 scoped_refptr<IndexedDBContextImpl> indexed_db_context_;
113 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; 115 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
114 scoped_refptr<base::SequencedTaskRunner> idb_runner_;
115 116
116 // Maps blob uuid to a pair (handle, ref count). Entry is added and/or count 117 // Maps blob uuid to a pair (handle, ref count). Entry is added and/or count
117 // is incremented in HoldBlobData(), and count is decremented and/or entry 118 // is incremented in HoldBlobData(), and count is decremented and/or entry
118 // removed in DropBlobData(). 119 // removed in DropBlobData().
119 std::map<std::string, 120 std::map<std::string,
120 std::pair<std::unique_ptr<storage::BlobDataHandle>, int>> 121 std::pair<std::unique_ptr<storage::BlobDataHandle>, int>>
121 blob_data_handle_map_; 122 blob_data_handle_map_;
122 123
123 // Used to set file permissions for blob storage. 124 // Used to set file permissions for blob storage.
124 const int ipc_process_id_; 125 const int ipc_process_id_;
125 126
126 mojo::AssociatedBindingSet<::indexed_db::mojom::Factory> bindings_; 127 mojo::AssociatedBindingSet<::indexed_db::mojom::Factory> bindings_;
127 128
128 mojo::StrongAssociatedBindingSet<::indexed_db::mojom::Database> 129 mojo::StrongAssociatedBindingSet<::indexed_db::mojom::Database>
129 database_bindings_; 130 database_bindings_;
130 131
131 mojo::StrongAssociatedBindingSet<::indexed_db::mojom::Cursor> 132 mojo::StrongAssociatedBindingSet<::indexed_db::mojom::Cursor>
132 cursor_bindings_; 133 cursor_bindings_;
133 134
134 IDBSequenceHelper* idb_helper_; 135 IDBSequenceHelper* idb_helper_;
135 136
136 base::WeakPtrFactory<IndexedDBDispatcherHost> weak_factory_; 137 base::WeakPtrFactory<IndexedDBDispatcherHost> weak_factory_;
137 138
138 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); 139 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost);
139 }; 140 };
140 141
141 } // namespace content 142 } // namespace content
142 143
143 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ 144 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698