OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/child/indexed_db/indexed_db_dispatcher.h" | 5 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/threading/thread_local.h" | 10 #include "base/threading/thread_local.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 params.object_store_id = object_store_id; | 422 params.object_store_id = object_store_id; |
423 params.key_range = key_range; | 423 params.key_range = key_range; |
424 Send(new IndexedDBHostMsg_DatabaseDeleteRange(params)); | 424 Send(new IndexedDBHostMsg_DatabaseDeleteRange(params)); |
425 } | 425 } |
426 | 426 |
427 void IndexedDBDispatcher::RequestIDBDatabaseClear( | 427 void IndexedDBDispatcher::RequestIDBDatabaseClear( |
428 int32 ipc_database_id, | 428 int32 ipc_database_id, |
429 int64 transaction_id, | 429 int64 transaction_id, |
430 int64 object_store_id, | 430 int64 object_store_id, |
431 WebIDBCallbacks* callbacks_ptr) { | 431 WebIDBCallbacks* callbacks_ptr) { |
| 432 ResetCursorPrefetchCaches(); |
432 scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); | 433 scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); |
433 int32 ipc_callbacks_id = pending_callbacks_.Add(callbacks.release()); | 434 int32 ipc_callbacks_id = pending_callbacks_.Add(callbacks.release()); |
434 Send(new IndexedDBHostMsg_DatabaseClear(CurrentWorkerId(), | 435 Send(new IndexedDBHostMsg_DatabaseClear(CurrentWorkerId(), |
435 ipc_callbacks_id, | 436 ipc_callbacks_id, |
436 ipc_database_id, | 437 ipc_database_id, |
437 transaction_id, | 438 transaction_id, |
438 object_store_id)); | 439 object_store_id)); |
439 } | 440 } |
440 | 441 |
441 void IndexedDBDispatcher::CursorDestroyed(int32 ipc_cursor_id) { | 442 void IndexedDBDispatcher::CursorDestroyed(int32 ipc_cursor_id) { |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 int32 ipc_exception_cursor_id) { | 720 int32 ipc_exception_cursor_id) { |
720 typedef std::map<int32, WebIDBCursorImpl*>::iterator Iterator; | 721 typedef std::map<int32, WebIDBCursorImpl*>::iterator Iterator; |
721 for (Iterator i = cursors_.begin(); i != cursors_.end(); ++i) { | 722 for (Iterator i = cursors_.begin(); i != cursors_.end(); ++i) { |
722 if (i->first == ipc_exception_cursor_id) | 723 if (i->first == ipc_exception_cursor_id) |
723 continue; | 724 continue; |
724 i->second->ResetPrefetchCache(); | 725 i->second->ResetPrefetchCache(); |
725 } | 726 } |
726 } | 727 } |
727 | 728 |
728 } // namespace content | 729 } // namespace content |
OLD | NEW |