Chromium Code Reviews| 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_backing_store.h" | 5 #include "content/browser/indexed_db/indexed_db_backing_store.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 985 | 985 |
| 986 bool IndexCursorOptions( | 986 bool IndexCursorOptions( |
| 987 LevelDBTransaction* transaction, | 987 LevelDBTransaction* transaction, |
| 988 int64_t database_id, | 988 int64_t database_id, |
| 989 int64_t object_store_id, | 989 int64_t object_store_id, |
| 990 int64_t index_id, | 990 int64_t index_id, |
| 991 const IndexedDBKeyRange& range, | 991 const IndexedDBKeyRange& range, |
| 992 blink::WebIDBCursorDirection direction, | 992 blink::WebIDBCursorDirection direction, |
| 993 IndexedDBBackingStore::Cursor::CursorOptions* cursor_options, | 993 IndexedDBBackingStore::Cursor::CursorOptions* cursor_options, |
| 994 Status* status) { | 994 Status* status) { |
| 995 IDB_TRACE("IndexedDBBackingStore::IndexCursorOptions"); | |
|
pwnall
2017/03/27 21:55:12
Is this intentional?
dmurph
2017/03/29 18:40:24
Done.
| |
| 996 DCHECK(transaction); | 995 DCHECK(transaction); |
| 997 if (!KeyPrefix::ValidIds(database_id, object_store_id, index_id)) | 996 if (!KeyPrefix::ValidIds(database_id, object_store_id, index_id)) |
| 998 return false; | 997 return false; |
| 999 | 998 |
| 1000 cursor_options->database_id = database_id; | 999 cursor_options->database_id = database_id; |
| 1001 cursor_options->object_store_id = object_store_id; | 1000 cursor_options->object_store_id = object_store_id; |
| 1002 cursor_options->index_id = index_id; | 1001 cursor_options->index_id = index_id; |
| 1003 | 1002 |
| 1004 bool lower_bound = range.lower().IsValid(); | 1003 bool lower_bound = range.lower().IsValid(); |
| 1005 bool upper_bound = range.upper().IsValid(); | 1004 bool upper_bound = range.upper().IsValid(); |
| (...skipping 2246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3252 if (!Continue(s)) | 3251 if (!Continue(s)) |
| 3253 return false; | 3252 return false; |
| 3254 } | 3253 } |
| 3255 return true; | 3254 return true; |
| 3256 } | 3255 } |
| 3257 | 3256 |
| 3258 bool IndexedDBBackingStore::Cursor::Continue(const IndexedDBKey* key, | 3257 bool IndexedDBBackingStore::Cursor::Continue(const IndexedDBKey* key, |
| 3259 const IndexedDBKey* primary_key, | 3258 const IndexedDBKey* primary_key, |
| 3260 IteratorState next_state, | 3259 IteratorState next_state, |
| 3261 Status* s) { | 3260 Status* s) { |
| 3262 IDB_TRACE("IndexedDBBackingStore::Cursor::Continue"); | |
|
pwnall
2017/03/27 21:55:12
Is this also intentional?
dmurph
2017/03/29 18:40:24
Done.
| |
| 3263 DCHECK(!key || next_state == SEEK); | 3261 DCHECK(!key || next_state == SEEK); |
| 3264 | 3262 |
| 3265 if (cursor_options_.forward) | 3263 if (cursor_options_.forward) |
| 3266 return ContinueNext(key, primary_key, next_state, s) == | 3264 return ContinueNext(key, primary_key, next_state, s) == |
| 3267 ContinueResult::DONE; | 3265 ContinueResult::DONE; |
| 3268 else | 3266 else |
| 3269 return ContinuePrevious(key, primary_key, next_state, s) == | 3267 return ContinuePrevious(key, primary_key, next_state, s) == |
| 3270 ContinueResult::DONE; | 3268 ContinueResult::DONE; |
| 3271 } | 3269 } |
| 3272 | 3270 |
| (...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4454 | 4452 |
| 4455 IndexedDBBackingStore::Transaction::WriteDescriptor::WriteDescriptor( | 4453 IndexedDBBackingStore::Transaction::WriteDescriptor::WriteDescriptor( |
| 4456 const WriteDescriptor& other) = default; | 4454 const WriteDescriptor& other) = default; |
| 4457 IndexedDBBackingStore::Transaction::WriteDescriptor::~WriteDescriptor() = | 4455 IndexedDBBackingStore::Transaction::WriteDescriptor::~WriteDescriptor() = |
| 4458 default; | 4456 default; |
| 4459 IndexedDBBackingStore::Transaction::WriteDescriptor& | 4457 IndexedDBBackingStore::Transaction::WriteDescriptor& |
| 4460 IndexedDBBackingStore::Transaction::WriteDescriptor:: | 4458 IndexedDBBackingStore::Transaction::WriteDescriptor:: |
| 4461 operator=(const WriteDescriptor& other) = default; | 4459 operator=(const WriteDescriptor& other) = default; |
| 4462 | 4460 |
| 4463 } // namespace content | 4461 } // namespace content |
| OLD | NEW |