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 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 int32 ipc_cursor_id, | 865 int32 ipc_cursor_id, |
866 int used_prefetches, | 866 int used_prefetches, |
867 int unused_prefetches) { | 867 int unused_prefetches) { |
868 DCHECK( | 868 DCHECK( |
869 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 869 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
870 IndexedDBCursor* idb_cursor = | 870 IndexedDBCursor* idb_cursor = |
871 parent_->GetOrTerminateProcess(&map_, ipc_cursor_id); | 871 parent_->GetOrTerminateProcess(&map_, ipc_cursor_id); |
872 if (!idb_cursor) | 872 if (!idb_cursor) |
873 return; | 873 return; |
874 | 874 |
875 idb_cursor->PrefetchReset(used_prefetches, unused_prefetches); | 875 leveldb::Status s = |
| 876 idb_cursor->PrefetchReset(used_prefetches, unused_prefetches); |
| 877 // TODO(cmumford): Handle this error (crbug.com/363397) |
| 878 if (!s.ok()) |
| 879 DLOG(ERROR) << "Unable to reset prefetch"; |
876 } | 880 } |
877 | 881 |
878 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( | 882 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( |
879 int32 ipc_object_id) { | 883 int32 ipc_object_id) { |
880 DCHECK( | 884 DCHECK( |
881 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 885 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
882 parent_->DestroyObject(&map_, ipc_object_id); | 886 parent_->DestroyObject(&map_, ipc_object_id); |
883 } | 887 } |
884 | 888 |
885 } // namespace content | 889 } // namespace content |
OLD | NEW |