| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/browser/indexed_db/indexed_db_fake_backing_store.h" |
| 6 #include "base/memory/scoped_ptr.h" |
| 7 |
| 8 namespace content { |
| 9 |
| 10 IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {} |
| 11 |
| 12 std::vector<string16> IndexedDBFakeBackingStore::GetDatabaseNames() { |
| 13 return std::vector<string16>(); |
| 14 } |
| 15 bool IndexedDBFakeBackingStore::GetIDBDatabaseMetaData( |
| 16 const string16& name, |
| 17 IndexedDBDatabaseMetadata*, |
| 18 bool& found) { |
| 19 return true; |
| 20 } |
| 21 |
| 22 bool IndexedDBFakeBackingStore::CreateIDBDatabaseMetaData( |
| 23 const string16& name, |
| 24 const string16& version, |
| 25 int64_t int_version, |
| 26 int64_t& row_id) { |
| 27 return true; |
| 28 } |
| 29 bool IndexedDBFakeBackingStore::UpdateIDBDatabaseMetaData( |
| 30 Transaction*, |
| 31 int64_t row_id, |
| 32 const string16& version) { |
| 33 return false; |
| 34 } |
| 35 bool IndexedDBFakeBackingStore::UpdateIDBDatabaseIntVersion(Transaction*, |
| 36 int64_t row_id, |
| 37 int64_t version) { |
| 38 return false; |
| 39 } |
| 40 bool IndexedDBFakeBackingStore::DeleteDatabase(const string16& name) { |
| 41 return false; |
| 42 } |
| 43 |
| 44 bool IndexedDBFakeBackingStore::CreateObjectStore(Transaction*, |
| 45 int64_t database_id, |
| 46 int64_t object_store_id, |
| 47 const string16& name, |
| 48 const IndexedDBKeyPath&, |
| 49 bool auto_increment) { |
| 50 return false; |
| 51 } |
| 52 |
| 53 bool IndexedDBFakeBackingStore::ClearObjectStore(Transaction*, |
| 54 int64_t database_id, |
| 55 int64_t object_store_id) { |
| 56 return false; |
| 57 } |
| 58 bool IndexedDBFakeBackingStore::DeleteRecord(Transaction*, |
| 59 int64_t database_id, |
| 60 int64_t object_store_id, |
| 61 const RecordIdentifier&) { |
| 62 return false; |
| 63 } |
| 64 bool IndexedDBFakeBackingStore::GetKeyGeneratorCurrentNumber( |
| 65 Transaction*, |
| 66 int64_t database_id, |
| 67 int64_t object_store_id, |
| 68 int64_t& current_number) { |
| 69 return true; |
| 70 } |
| 71 bool IndexedDBFakeBackingStore::MaybeUpdateKeyGeneratorCurrentNumber( |
| 72 Transaction*, |
| 73 int64_t database_id, |
| 74 int64_t object_store_id, |
| 75 int64_t new_number, |
| 76 bool check_current) { |
| 77 return true; |
| 78 } |
| 79 bool IndexedDBFakeBackingStore::KeyExistsInObjectStore( |
| 80 Transaction*, |
| 81 int64_t database_id, |
| 82 int64_t object_store_id, |
| 83 const IndexedDBKey&, |
| 84 RecordIdentifier* found_record_identifier, |
| 85 bool& found) { |
| 86 return true; |
| 87 } |
| 88 |
| 89 bool IndexedDBFakeBackingStore::CreateIndex(Transaction*, |
| 90 int64_t database_id, |
| 91 int64_t object_store_id, |
| 92 int64_t index_id, |
| 93 const string16& name, |
| 94 const IndexedDBKeyPath&, |
| 95 bool is_unique, |
| 96 bool is_multi_entry) { |
| 97 return false; |
| 98 } |
| 99 ; |
| 100 bool IndexedDBFakeBackingStore::DeleteIndex(Transaction*, |
| 101 int64_t database_id, |
| 102 int64_t object_store_id, |
| 103 int64_t index_id) { |
| 104 return false; |
| 105 } |
| 106 bool IndexedDBFakeBackingStore::PutIndexDataForRecord(Transaction*, |
| 107 int64_t database_id, |
| 108 int64_t object_store_id, |
| 109 int64_t index_id, |
| 110 const IndexedDBKey&, |
| 111 const RecordIdentifier&) { |
| 112 return false; |
| 113 } |
| 114 |
| 115 scoped_ptr<IndexedDBBackingStore::Cursor> |
| 116 IndexedDBFakeBackingStore::OpenObjectStoreKeyCursor( |
| 117 IndexedDBBackingStore::Transaction* transaction, |
| 118 int64 database_id, |
| 119 int64 object_store_id, |
| 120 const IndexedDBKeyRange& key_range, |
| 121 indexed_db::CursorDirection) { |
| 122 return scoped_ptr<IndexedDBBackingStore::Cursor>(); |
| 123 } |
| 124 scoped_ptr<IndexedDBBackingStore::Cursor> |
| 125 IndexedDBFakeBackingStore::OpenObjectStoreCursor( |
| 126 IndexedDBBackingStore::Transaction* transaction, |
| 127 int64 database_id, |
| 128 int64 object_store_id, |
| 129 const IndexedDBKeyRange& key_range, |
| 130 indexed_db::CursorDirection) { |
| 131 return scoped_ptr<IndexedDBBackingStore::Cursor>(); |
| 132 } |
| 133 scoped_ptr<IndexedDBBackingStore::Cursor> |
| 134 IndexedDBFakeBackingStore::OpenIndexKeyCursor( |
| 135 IndexedDBBackingStore::Transaction* transaction, |
| 136 int64 database_id, |
| 137 int64 object_store_id, |
| 138 int64 index_id, |
| 139 const IndexedDBKeyRange& key_range, |
| 140 indexed_db::CursorDirection) { |
| 141 return scoped_ptr<IndexedDBBackingStore::Cursor>(); |
| 142 } |
| 143 scoped_ptr<IndexedDBBackingStore::Cursor> |
| 144 IndexedDBFakeBackingStore::OpenIndexCursor( |
| 145 IndexedDBBackingStore::Transaction* transaction, |
| 146 int64 database_id, |
| 147 int64 object_store_id, |
| 148 int64 index_id, |
| 149 const IndexedDBKeyRange& key_range, |
| 150 indexed_db::CursorDirection) { |
| 151 return scoped_ptr<IndexedDBBackingStore::Cursor>(); |
| 152 } |
| 153 |
| 154 } // namespace content |
| OLD | NEW |