| 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/process/process.h" | 10 #include "base/process/process.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "webkit/browser/database/database_util.h" | 26 #include "webkit/browser/database/database_util.h" |
| 27 #include "webkit/common/database/database_identifier.h" | 27 #include "webkit/common/database/database_identifier.h" |
| 28 | 28 |
| 29 using webkit_database::DatabaseUtil; | 29 using webkit_database::DatabaseUtil; |
| 30 using blink::WebIDBKey; | 30 using blink::WebIDBKey; |
| 31 | 31 |
| 32 namespace content { | 32 namespace content { |
| 33 | 33 |
| 34 IndexedDBDispatcherHost::IndexedDBDispatcherHost( | 34 IndexedDBDispatcherHost::IndexedDBDispatcherHost( |
| 35 IndexedDBContextImpl* indexed_db_context) | 35 IndexedDBContextImpl* indexed_db_context) |
| 36 : BrowserMessageFilter(IndexedDBMsgStart), | 36 : indexed_db_context_(indexed_db_context), |
| 37 indexed_db_context_(indexed_db_context), | |
| 38 database_dispatcher_host_(new DatabaseDispatcherHost(this)), | 37 database_dispatcher_host_(new DatabaseDispatcherHost(this)), |
| 39 cursor_dispatcher_host_(new CursorDispatcherHost(this)) { | 38 cursor_dispatcher_host_(new CursorDispatcherHost(this)) { |
| 40 DCHECK(indexed_db_context_); | 39 DCHECK(indexed_db_context_); |
| 41 } | 40 } |
| 42 | 41 |
| 43 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() {} | 42 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() {} |
| 44 | 43 |
| 45 void IndexedDBDispatcherHost::OnChannelClosing() { | 44 void IndexedDBDispatcherHost::OnChannelClosing() { |
| 46 bool success = indexed_db_context_->TaskRunner()->PostTask( | 45 bool success = indexed_db_context_->TaskRunner()->PostTask( |
| 47 FROM_HERE, | 46 FROM_HERE, |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 } | 842 } |
| 844 | 843 |
| 845 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( | 844 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( |
| 846 int32 ipc_object_id) { | 845 int32 ipc_object_id) { |
| 847 DCHECK( | 846 DCHECK( |
| 848 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 847 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
| 849 parent_->DestroyObject(&map_, ipc_object_id); | 848 parent_->DestroyObject(&map_, ipc_object_id); |
| 850 } | 849 } |
| 851 | 850 |
| 852 } // namespace content | 851 } // namespace content |
| OLD | NEW |