| 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 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 5 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 IndexedDBContextImpl* indexed_db_context, | 43 IndexedDBContextImpl* indexed_db_context, |
| 44 ChromeBlobStorageContext* blob_storage_context) | 44 ChromeBlobStorageContext* blob_storage_context) |
| 45 : BrowserMessageFilter(IndexedDBMsgStart), | 45 : BrowserMessageFilter(IndexedDBMsgStart), |
| 46 request_context_getter_(request_context_getter), | 46 request_context_getter_(request_context_getter), |
| 47 request_context_(NULL), | 47 request_context_(NULL), |
| 48 indexed_db_context_(indexed_db_context), | 48 indexed_db_context_(indexed_db_context), |
| 49 blob_storage_context_(blob_storage_context), | 49 blob_storage_context_(blob_storage_context), |
| 50 database_dispatcher_host_(new DatabaseDispatcherHost(this)), | 50 database_dispatcher_host_(new DatabaseDispatcherHost(this)), |
| 51 cursor_dispatcher_host_(new CursorDispatcherHost(this)), | 51 cursor_dispatcher_host_(new CursorDispatcherHost(this)), |
| 52 ipc_process_id_(ipc_process_id) { | 52 ipc_process_id_(ipc_process_id) { |
| 53 DCHECK(indexed_db_context_); | 53 DCHECK(indexed_db_context_.get()); |
| 54 } | 54 } |
| 55 | 55 |
| 56 IndexedDBDispatcherHost::IndexedDBDispatcherHost( | 56 IndexedDBDispatcherHost::IndexedDBDispatcherHost( |
| 57 int ipc_process_id, | 57 int ipc_process_id, |
| 58 net::URLRequestContext* request_context, | 58 net::URLRequestContext* request_context, |
| 59 IndexedDBContextImpl* indexed_db_context, | 59 IndexedDBContextImpl* indexed_db_context, |
| 60 ChromeBlobStorageContext* blob_storage_context) | 60 ChromeBlobStorageContext* blob_storage_context) |
| 61 : BrowserMessageFilter(IndexedDBMsgStart), | 61 : BrowserMessageFilter(IndexedDBMsgStart), |
| 62 request_context_(request_context), | 62 request_context_(request_context), |
| 63 indexed_db_context_(indexed_db_context), | 63 indexed_db_context_(indexed_db_context), |
| 64 blob_storage_context_(blob_storage_context), | 64 blob_storage_context_(blob_storage_context), |
| 65 database_dispatcher_host_(new DatabaseDispatcherHost(this)), | 65 database_dispatcher_host_(new DatabaseDispatcherHost(this)), |
| 66 cursor_dispatcher_host_(new CursorDispatcherHost(this)), | 66 cursor_dispatcher_host_(new CursorDispatcherHost(this)), |
| 67 ipc_process_id_(ipc_process_id) { | 67 ipc_process_id_(ipc_process_id) { |
| 68 DCHECK(indexed_db_context_); | 68 DCHECK(indexed_db_context_.get()); |
| 69 } | 69 } |
| 70 | 70 |
| 71 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() { | 71 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() { |
| 72 STLDeleteValues(&blob_data_handle_map_); | 72 STLDeleteValues(&blob_data_handle_map_); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void IndexedDBDispatcherHost::OnChannelConnected(int32 peer_pid) { | 75 void IndexedDBDispatcherHost::OnChannelConnected(int32 peer_pid) { |
| 76 BrowserMessageFilter::OnChannelConnected(peer_pid); | 76 BrowserMessageFilter::OnChannelConnected(peer_pid); |
| 77 | 77 |
| 78 if (request_context_getter_.get()) { | 78 if (request_context_getter_.get()) { |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 } | 992 } |
| 993 | 993 |
| 994 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( | 994 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( |
| 995 int32 ipc_object_id) { | 995 int32 ipc_object_id) { |
| 996 DCHECK( | 996 DCHECK( |
| 997 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 997 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
| 998 parent_->DestroyObject(&map_, ipc_object_id); | 998 parent_->DestroyObject(&map_, ipc_object_id); |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 } // namespace content | 1001 } // namespace content |
| OLD | NEW |