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 12 matching lines...) Expand all Loading... |
23 #include "content/public/common/result_codes.h" | 23 #include "content/public/common/result_codes.h" |
24 #include "third_party/WebKit/public/platform/WebIDBDatabaseException.h" | 24 #include "third_party/WebKit/public/platform/WebIDBDatabaseException.h" |
25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
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 namespace { |
| 34 const uint32 kFilteredMessageClasses[] = { |
| 35 IndexedDBMsgStart, |
| 36 }; |
| 37 } // namespace |
33 | 38 |
34 IndexedDBDispatcherHost::IndexedDBDispatcherHost( | 39 IndexedDBDispatcherHost::IndexedDBDispatcherHost( |
35 IndexedDBContextImpl* indexed_db_context) | 40 IndexedDBContextImpl* indexed_db_context) |
36 : indexed_db_context_(indexed_db_context), | 41 : BrowserMessageFilter( |
| 42 kFilteredMessageClasses, arraysize(kFilteredMessageClasses)), |
| 43 indexed_db_context_(indexed_db_context), |
37 database_dispatcher_host_(new DatabaseDispatcherHost(this)), | 44 database_dispatcher_host_(new DatabaseDispatcherHost(this)), |
38 cursor_dispatcher_host_(new CursorDispatcherHost(this)) { | 45 cursor_dispatcher_host_(new CursorDispatcherHost(this)) { |
39 DCHECK(indexed_db_context_); | 46 DCHECK(indexed_db_context_); |
40 } | 47 } |
41 | 48 |
42 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() {} | 49 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() {} |
43 | 50 |
44 void IndexedDBDispatcherHost::OnChannelClosing() { | 51 void IndexedDBDispatcherHost::OnChannelClosing() { |
45 bool success = indexed_db_context_->TaskRunner()->PostTask( | 52 bool success = indexed_db_context_->TaskRunner()->PostTask( |
46 FROM_HERE, | 53 FROM_HERE, |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 } | 849 } |
843 | 850 |
844 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( | 851 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( |
845 int32 ipc_object_id) { | 852 int32 ipc_object_id) { |
846 DCHECK( | 853 DCHECK( |
847 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 854 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
848 parent_->DestroyObject(&map_, ipc_object_id); | 855 parent_->DestroyObject(&map_, ipc_object_id); |
849 } | 856 } |
850 | 857 |
851 } // namespace content | 858 } // namespace content |
OLD | NEW |