| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void Open(::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info, | 70 void Open(::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info, |
| 71 ::indexed_db::mojom::DatabaseCallbacksAssociatedPtrInfo | 71 ::indexed_db::mojom::DatabaseCallbacksAssociatedPtrInfo |
| 72 database_callbacks_info, | 72 database_callbacks_info, |
| 73 const url::Origin& origin, | 73 const url::Origin& origin, |
| 74 const base::string16& name, | 74 const base::string16& name, |
| 75 int64_t version, | 75 int64_t version, |
| 76 int64_t transaction_id) override; | 76 int64_t transaction_id) override; |
| 77 void DeleteDatabase( | 77 void DeleteDatabase( |
| 78 ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info, | 78 ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info, |
| 79 const url::Origin& origin, | 79 const url::Origin& origin, |
| 80 const base::string16& name) override; | 80 const base::string16& name, |
| 81 bool force_close) override; |
| 81 | 82 |
| 82 void GetDatabaseNamesOnIDBThread(scoped_refptr<IndexedDBCallbacks> callbacks, | 83 void GetDatabaseNamesOnIDBThread(scoped_refptr<IndexedDBCallbacks> callbacks, |
| 83 const url::Origin& origin); | 84 const url::Origin& origin); |
| 84 void OpenOnIDBThread( | 85 void OpenOnIDBThread( |
| 85 scoped_refptr<IndexedDBCallbacks> callbacks, | 86 scoped_refptr<IndexedDBCallbacks> callbacks, |
| 86 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks, | 87 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks, |
| 87 const url::Origin& origin, | 88 const url::Origin& origin, |
| 88 const base::string16& name, | 89 const base::string16& name, |
| 89 int64_t version, | 90 int64_t version, |
| 90 int64_t transaction_id); | 91 int64_t transaction_id); |
| 91 void DeleteDatabaseOnIDBThread(scoped_refptr<IndexedDBCallbacks> callbacks, | 92 void DeleteDatabaseOnIDBThread(scoped_refptr<IndexedDBCallbacks> callbacks, |
| 92 const url::Origin& origin, | 93 const url::Origin& origin, |
| 93 const base::string16& name); | 94 const base::string16& name, |
| 95 bool force_close); |
| 94 | 96 |
| 95 void ResetDispatcherHosts(); | 97 void ResetDispatcherHosts(); |
| 96 | 98 |
| 97 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 99 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
| 98 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; | 100 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; |
| 99 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 101 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
| 100 | 102 |
| 101 // Maps blob uuid to a pair (handle, ref count). Entry is added and/or count | 103 // Maps blob uuid to a pair (handle, ref count). Entry is added and/or count |
| 102 // is incremented in HoldBlobData(), and count is decremented and/or entry | 104 // is incremented in HoldBlobData(), and count is decremented and/or entry |
| 103 // removed in DropBlobData(). | 105 // removed in DropBlobData(). |
| 104 std::map<std::string, | 106 std::map<std::string, |
| 105 std::pair<std::unique_ptr<storage::BlobDataHandle>, int>> | 107 std::pair<std::unique_ptr<storage::BlobDataHandle>, int>> |
| 106 blob_data_handle_map_; | 108 blob_data_handle_map_; |
| 107 | 109 |
| 108 // Used to set file permissions for blob storage. | 110 // Used to set file permissions for blob storage. |
| 109 const int ipc_process_id_; | 111 const int ipc_process_id_; |
| 110 | 112 |
| 111 mojo::AssociatedBindingSet<::indexed_db::mojom::Factory> bindings_; | 113 mojo::AssociatedBindingSet<::indexed_db::mojom::Factory> bindings_; |
| 112 | 114 |
| 113 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); | 115 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); |
| 114 }; | 116 }; |
| 115 | 117 |
| 116 } // namespace content | 118 } // namespace content |
| 117 | 119 |
| 118 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ | 120 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ |
| OLD | NEW |