| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/browser/indexed_db/indexed_db_cursor.h" | 5 #include "content/browser/indexed_db/indexed_db_cursor.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "content/browser/indexed_db/indexed_db_callbacks.h" | 11 #include "content/browser/indexed_db/indexed_db_callbacks.h" |
| 12 #include "content/browser/indexed_db/indexed_db_database_error.h" | 12 #include "content/browser/indexed_db/indexed_db_database_error.h" |
| 13 #include "content/browser/indexed_db/indexed_db_tracing.h" | 13 #include "content/browser/indexed_db/indexed_db_tracing.h" |
| 14 #include "content/browser/indexed_db/indexed_db_transaction.h" | 14 #include "content/browser/indexed_db/indexed_db_transaction.h" |
| 15 #include "content/browser/indexed_db/indexed_db_value.h" | 15 #include "content/browser/indexed_db/indexed_db_value.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 IndexedDBCursor::IndexedDBCursor( | 19 IndexedDBCursor::IndexedDBCursor( |
| 20 scoped_ptr<IndexedDBBackingStore::Cursor> cursor, | 20 scoped_ptr<IndexedDBBackingStore::Cursor> cursor, |
| 21 indexed_db::CursorType cursor_type, | 21 indexed_db::CursorType cursor_type, |
| 22 IndexedDBDatabase::TaskType task_type, | 22 blink::WebIDBTaskType task_type, |
| 23 IndexedDBTransaction* transaction) | 23 IndexedDBTransaction* transaction) |
| 24 : task_type_(task_type), | 24 : task_type_(task_type), |
| 25 cursor_type_(cursor_type), | 25 cursor_type_(cursor_type), |
| 26 transaction_(transaction), | 26 transaction_(transaction), |
| 27 cursor_(cursor.Pass()), | 27 cursor_(cursor.Pass()), |
| 28 closed_(false) { | 28 closed_(false) { |
| 29 transaction_->RegisterOpenCursor(this); | 29 transaction_->RegisterOpenCursor(this); |
| 30 } | 30 } |
| 31 | 31 |
| 32 IndexedDBCursor::~IndexedDBCursor() { | 32 IndexedDBCursor::~IndexedDBCursor() { |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 } | 195 } |
| 196 | 196 |
| 197 void IndexedDBCursor::Close() { | 197 void IndexedDBCursor::Close() { |
| 198 IDB_TRACE("IndexedDBCursor::Close"); | 198 IDB_TRACE("IndexedDBCursor::Close"); |
| 199 closed_ = true; | 199 closed_ = true; |
| 200 cursor_.reset(); | 200 cursor_.reset(); |
| 201 saved_cursor_.reset(); | 201 saved_cursor_.reset(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace content | 204 } // namespace content |
| OLD | NEW |