OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_fake_backing_store.h" | 5 #include "content/browser/indexed_db/indexed_db_fake_backing_store.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 void IndexedDBFakeBackingStore::ReportBlobUnused(int64 database_id, | 157 void IndexedDBFakeBackingStore::ReportBlobUnused(int64 database_id, |
158 int64 blob_key) {} | 158 int64 blob_key) {} |
159 | 159 |
160 scoped_ptr<IndexedDBBackingStore::Cursor> | 160 scoped_ptr<IndexedDBBackingStore::Cursor> |
161 IndexedDBFakeBackingStore::OpenObjectStoreKeyCursor( | 161 IndexedDBFakeBackingStore::OpenObjectStoreKeyCursor( |
162 IndexedDBBackingStore::Transaction* transaction, | 162 IndexedDBBackingStore::Transaction* transaction, |
163 int64 database_id, | 163 int64 database_id, |
164 int64 object_store_id, | 164 int64 object_store_id, |
165 const IndexedDBKeyRange& key_range, | 165 const IndexedDBKeyRange& key_range, |
166 indexed_db::CursorDirection, | 166 blink::WebIDBCursorDirection, |
167 leveldb::Status* s) { | 167 leveldb::Status* s) { |
168 return scoped_ptr<IndexedDBBackingStore::Cursor>(); | 168 return scoped_ptr<IndexedDBBackingStore::Cursor>(); |
169 } | 169 } |
170 scoped_ptr<IndexedDBBackingStore::Cursor> | 170 scoped_ptr<IndexedDBBackingStore::Cursor> |
171 IndexedDBFakeBackingStore::OpenObjectStoreCursor( | 171 IndexedDBFakeBackingStore::OpenObjectStoreCursor( |
172 IndexedDBBackingStore::Transaction* transaction, | 172 IndexedDBBackingStore::Transaction* transaction, |
173 int64 database_id, | 173 int64 database_id, |
174 int64 object_store_id, | 174 int64 object_store_id, |
175 const IndexedDBKeyRange& key_range, | 175 const IndexedDBKeyRange& key_range, |
176 indexed_db::CursorDirection, | 176 blink::WebIDBCursorDirection, |
177 leveldb::Status* s) { | 177 leveldb::Status* s) { |
178 return scoped_ptr<IndexedDBBackingStore::Cursor>(); | 178 return scoped_ptr<IndexedDBBackingStore::Cursor>(); |
179 } | 179 } |
180 scoped_ptr<IndexedDBBackingStore::Cursor> | 180 scoped_ptr<IndexedDBBackingStore::Cursor> |
181 IndexedDBFakeBackingStore::OpenIndexKeyCursor( | 181 IndexedDBFakeBackingStore::OpenIndexKeyCursor( |
182 IndexedDBBackingStore::Transaction* transaction, | 182 IndexedDBBackingStore::Transaction* transaction, |
183 int64 database_id, | 183 int64 database_id, |
184 int64 object_store_id, | 184 int64 object_store_id, |
185 int64 index_id, | 185 int64 index_id, |
186 const IndexedDBKeyRange& key_range, | 186 const IndexedDBKeyRange& key_range, |
187 indexed_db::CursorDirection, | 187 blink::WebIDBCursorDirection, |
188 leveldb::Status* s) { | 188 leveldb::Status* s) { |
189 return scoped_ptr<IndexedDBBackingStore::Cursor>(); | 189 return scoped_ptr<IndexedDBBackingStore::Cursor>(); |
190 } | 190 } |
191 scoped_ptr<IndexedDBBackingStore::Cursor> | 191 scoped_ptr<IndexedDBBackingStore::Cursor> |
192 IndexedDBFakeBackingStore::OpenIndexCursor( | 192 IndexedDBFakeBackingStore::OpenIndexCursor( |
193 IndexedDBBackingStore::Transaction* transaction, | 193 IndexedDBBackingStore::Transaction* transaction, |
194 int64 database_id, | 194 int64 database_id, |
195 int64 object_store_id, | 195 int64 object_store_id, |
196 int64 index_id, | 196 int64 index_id, |
197 const IndexedDBKeyRange& key_range, | 197 const IndexedDBKeyRange& key_range, |
198 indexed_db::CursorDirection, | 198 blink::WebIDBCursorDirection, |
199 leveldb::Status* s) { | 199 leveldb::Status* s) { |
200 return scoped_ptr<IndexedDBBackingStore::Cursor>(); | 200 return scoped_ptr<IndexedDBBackingStore::Cursor>(); |
201 } | 201 } |
202 | 202 |
203 IndexedDBFakeBackingStore::FakeTransaction::FakeTransaction( | 203 IndexedDBFakeBackingStore::FakeTransaction::FakeTransaction( |
204 leveldb::Status result) | 204 leveldb::Status result) |
205 : IndexedDBBackingStore::Transaction(NULL), result_(result) { | 205 : IndexedDBBackingStore::Transaction(NULL), result_(result) { |
206 } | 206 } |
207 void IndexedDBFakeBackingStore::FakeTransaction::Begin() {} | 207 void IndexedDBFakeBackingStore::FakeTransaction::Begin() {} |
208 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::CommitPhaseOne( | 208 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::CommitPhaseOne( |
209 scoped_refptr<BlobWriteCallback> callback) { | 209 scoped_refptr<BlobWriteCallback> callback) { |
210 callback->Run(true); | 210 callback->Run(true); |
211 return leveldb::Status::OK(); | 211 return leveldb::Status::OK(); |
212 } | 212 } |
213 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::CommitPhaseTwo() { | 213 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::CommitPhaseTwo() { |
214 return result_; | 214 return result_; |
215 } | 215 } |
216 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {} | 216 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {} |
217 | 217 |
218 } // namespace content | 218 } // namespace content |
OLD | NEW |