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