OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h" | 5 #include "chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/chrome_thread.h" | 8 #include "chrome/browser/chrome_thread.h" |
9 #include "chrome/browser/in_process_webkit/indexed_db_callbacks.h" | 9 #include "chrome/browser/in_process_webkit/indexed_db_callbacks.h" |
10 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 10 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 const IPC::Message& message) { | 122 const IPC::Message& message) { |
123 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT)); | 123 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT)); |
124 DCHECK(process_handle_); | 124 DCHECK(process_handle_); |
125 | 125 |
126 bool msg_is_ok = true; | 126 bool msg_is_ok = true; |
127 bool handled = | 127 bool handled = |
128 database_dispatcher_host_->OnMessageReceived(message, &msg_is_ok) || | 128 database_dispatcher_host_->OnMessageReceived(message, &msg_is_ok) || |
129 index_dispatcher_host_->OnMessageReceived(message, &msg_is_ok); | 129 index_dispatcher_host_->OnMessageReceived(message, &msg_is_ok); |
130 | 130 |
131 if (!handled) { | 131 if (!handled) { |
| 132 handled = true; |
| 133 DCHECK(msg_is_ok); |
132 IPC_BEGIN_MESSAGE_MAP_EX(IndexedDBDispatcherHost, message, msg_is_ok) | 134 IPC_BEGIN_MESSAGE_MAP_EX(IndexedDBDispatcherHost, message, msg_is_ok) |
133 IPC_MESSAGE_HANDLER(ViewHostMsg_IndexedDatabaseOpen, | 135 IPC_MESSAGE_HANDLER(ViewHostMsg_IndexedDatabaseOpen, |
134 OnIndexedDatabaseOpen) | 136 OnIndexedDatabaseOpen) |
135 IPC_MESSAGE_UNHANDLED(handled = false) | 137 IPC_MESSAGE_UNHANDLED(handled = false) |
136 IPC_END_MESSAGE_MAP() | 138 IPC_END_MESSAGE_MAP() |
137 } | 139 } |
138 | 140 |
139 DCHECK(handled); | 141 DCHECK(handled); |
140 if (!msg_is_ok) { | 142 if (!msg_is_ok) { |
141 BrowserRenderProcessHost::BadMessageTerminateProcess(message.type(), | 143 BrowserRenderProcessHost::BadMessageTerminateProcess(message.type(), |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 void IndexedDBDispatcherHost::IndexDispatcherHost::OnUnique( | 352 void IndexedDBDispatcherHost::IndexDispatcherHost::OnUnique( |
351 int32 object_id, IPC::Message* reply_msg) { | 353 int32 object_id, IPC::Message* reply_msg) { |
352 parent_->SyncGetter<bool, ViewHostMsg_IDBIndexUnique>( | 354 parent_->SyncGetter<bool, ViewHostMsg_IDBIndexUnique>( |
353 &map_, object_id, reply_msg, &WebIDBIndex::unique); | 355 &map_, object_id, reply_msg, &WebIDBIndex::unique); |
354 } | 356 } |
355 | 357 |
356 void IndexedDBDispatcherHost::IndexDispatcherHost::OnDestroyed( | 358 void IndexedDBDispatcherHost::IndexDispatcherHost::OnDestroyed( |
357 int32 object_id) { | 359 int32 object_id) { |
358 parent_->DestroyObject(&map_, object_id, ViewHostMsg_IDBIndexDestroyed::ID); | 360 parent_->DestroyObject(&map_, object_id, ViewHostMsg_IDBIndexDestroyed::ID); |
359 } | 361 } |
OLD | NEW |