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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
8 | 9 |
9 namespace content { | 10 namespace content { |
10 | 11 |
11 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore() | 12 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore() |
12 : IndexedDBBackingStore(NULL, | 13 : IndexedDBBackingStore(NULL, |
13 GURL("http://localhost:81"), | 14 GURL("http://localhost:81"), |
| 15 base::FilePath(), |
14 scoped_ptr<LevelDBDatabase>(), | 16 scoped_ptr<LevelDBDatabase>(), |
15 scoped_ptr<LevelDBComparator>(), | 17 scoped_ptr<LevelDBComparator>(), |
16 NULL) {} | 18 NULL) {} |
17 | 19 |
18 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore( | 20 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore( |
19 IndexedDBFactory* factory, | 21 IndexedDBFactory* factory, |
20 base::TaskRunner* task_runner) | 22 base::TaskRunner* task_runner) |
21 : IndexedDBBackingStore(factory, | 23 : IndexedDBBackingStore(factory, |
22 GURL("http://localhost:81"), | 24 GURL("http://localhost:81"), |
| 25 base::FilePath(), |
23 scoped_ptr<LevelDBDatabase>(), | 26 scoped_ptr<LevelDBDatabase>(), |
24 scoped_ptr<LevelDBComparator>(), | 27 scoped_ptr<LevelDBComparator>(), |
25 task_runner) {} | 28 task_runner) {} |
26 | 29 |
27 IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {} | 30 IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {} |
28 | 31 |
29 std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames( | 32 std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames( |
30 leveldb::Status* s) { | 33 leveldb::Status* s) { |
31 *s = leveldb::Status::OK(); | 34 *s = leveldb::Status::OK(); |
32 return std::vector<base::string16>(); | 35 return std::vector<base::string16>(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 void IndexedDBFakeBackingStore::FakeTransaction::Begin() {} | 185 void IndexedDBFakeBackingStore::FakeTransaction::Begin() {} |
183 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::Commit() { | 186 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::Commit() { |
184 if (result_) | 187 if (result_) |
185 return leveldb::Status::OK(); | 188 return leveldb::Status::OK(); |
186 else | 189 else |
187 return leveldb::Status::IOError("test error"); | 190 return leveldb::Status::IOError("test error"); |
188 } | 191 } |
189 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {} | 192 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {} |
190 | 193 |
191 } // namespace content | 194 } // namespace content |
OLD | NEW |