| 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 { |
| 11 | 11 |
| 12 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore() | 12 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore() |
| 13 : IndexedDBBackingStore(NULL /* indexed_db_factory */, | 13 : IndexedDBBackingStore(NULL /* indexed_db_factory */, |
| 14 GURL("http://localhost:81"), | 14 url::Origin(GURL("http://localhost:81")), |
| 15 base::FilePath(), | 15 base::FilePath(), |
| 16 NULL /* request_context */, | 16 NULL /* request_context */, |
| 17 scoped_ptr<LevelDBDatabase>(), | 17 scoped_ptr<LevelDBDatabase>(), |
| 18 scoped_ptr<LevelDBComparator>(), | 18 scoped_ptr<LevelDBComparator>(), |
| 19 NULL /* task_runner */) { | 19 NULL /* task_runner */) {} |
| 20 } | |
| 21 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore( | 20 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore( |
| 22 IndexedDBFactory* factory, | 21 IndexedDBFactory* factory, |
| 23 base::SequencedTaskRunner* task_runner) | 22 base::SequencedTaskRunner* task_runner) |
| 24 : IndexedDBBackingStore(factory, | 23 : IndexedDBBackingStore(factory, |
| 25 GURL("http://localhost:81"), | 24 url::Origin(GURL("http://localhost:81")), |
| 26 base::FilePath(), | 25 base::FilePath(), |
| 27 NULL /* request_context */, | 26 NULL /* request_context */, |
| 28 scoped_ptr<LevelDBDatabase>(), | 27 scoped_ptr<LevelDBDatabase>(), |
| 29 scoped_ptr<LevelDBComparator>(), | 28 scoped_ptr<LevelDBComparator>(), |
| 30 task_runner) { | 29 task_runner) {} |
| 31 } | |
| 32 IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {} | 30 IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {} |
| 33 | 31 |
| 34 std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames( | 32 std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames( |
| 35 leveldb::Status* s) { | 33 leveldb::Status* s) { |
| 36 *s = leveldb::Status::OK(); | 34 *s = leveldb::Status::OK(); |
| 37 return std::vector<base::string16>(); | 35 return std::vector<base::string16>(); |
| 38 } | 36 } |
| 39 leveldb::Status IndexedDBFakeBackingStore::GetIDBDatabaseMetaData( | 37 leveldb::Status IndexedDBFakeBackingStore::GetIDBDatabaseMetaData( |
| 40 const base::string16& name, | 38 const base::string16& name, |
| 41 IndexedDBDatabaseMetadata*, | 39 IndexedDBDatabaseMetadata*, |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 scoped_refptr<BlobWriteCallback> callback) { | 206 scoped_refptr<BlobWriteCallback> callback) { |
| 209 callback->Run(true); | 207 callback->Run(true); |
| 210 return leveldb::Status::OK(); | 208 return leveldb::Status::OK(); |
| 211 } | 209 } |
| 212 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::CommitPhaseTwo() { | 210 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::CommitPhaseTwo() { |
| 213 return result_; | 211 return result_; |
| 214 } | 212 } |
| 215 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {} | 213 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {} |
| 216 | 214 |
| 217 } // namespace content | 215 } // namespace content |
| OLD | NEW |