| 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 "net/url_request/url_request_context_getter.h" | 8 #include "net/url_request/url_request_context_getter.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 url::Origin(GURL("http://localhost:81")), | 14 url::Origin(GURL("http://localhost:81")), |
| 15 base::FilePath(), | 15 base::FilePath(), |
| 16 IndexedDBDataFormatVersion(), |
| 16 scoped_refptr<net::URLRequestContextGetter>(), | 17 scoped_refptr<net::URLRequestContextGetter>(), |
| 17 std::unique_ptr<LevelDBDatabase>(), | 18 std::unique_ptr<LevelDBDatabase>(), |
| 18 std::unique_ptr<LevelDBComparator>(), | 19 std::unique_ptr<LevelDBComparator>(), |
| 19 NULL /* task_runner */) {} | 20 NULL /* task_runner */) {} |
| 20 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore( | 21 IndexedDBFakeBackingStore::IndexedDBFakeBackingStore( |
| 21 IndexedDBFactory* factory, | 22 IndexedDBFactory* factory, |
| 22 base::SequencedTaskRunner* task_runner) | 23 base::SequencedTaskRunner* task_runner) |
| 23 : IndexedDBBackingStore(factory, | 24 : IndexedDBBackingStore(factory, |
| 24 url::Origin(GURL("http://localhost:81")), | 25 url::Origin(GURL("http://localhost:81")), |
| 25 base::FilePath(), | 26 base::FilePath(), |
| 27 IndexedDBDataFormatVersion(), |
| 26 NULL /* request_context */, | 28 NULL /* request_context */, |
| 27 std::unique_ptr<LevelDBDatabase>(), | 29 std::unique_ptr<LevelDBDatabase>(), |
| 28 std::unique_ptr<LevelDBComparator>(), | 30 std::unique_ptr<LevelDBComparator>(), |
| 29 task_runner) {} | 31 task_runner) {} |
| 30 IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {} | 32 IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {} |
| 31 | 33 |
| 32 std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames( | 34 std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames( |
| 33 leveldb::Status* s) { | 35 leveldb::Status* s) { |
| 34 *s = leveldb::Status::OK(); | 36 *s = leveldb::Status::OK(); |
| 35 return std::vector<base::string16>(); | 37 return std::vector<base::string16>(); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 scoped_refptr<BlobWriteCallback> callback) { | 222 scoped_refptr<BlobWriteCallback> callback) { |
| 221 callback->Run(IndexedDBBackingStore::BlobWriteResult::SUCCESS_SYNC); | 223 callback->Run(IndexedDBBackingStore::BlobWriteResult::SUCCESS_SYNC); |
| 222 return leveldb::Status::OK(); | 224 return leveldb::Status::OK(); |
| 223 } | 225 } |
| 224 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::CommitPhaseTwo() { | 226 leveldb::Status IndexedDBFakeBackingStore::FakeTransaction::CommitPhaseTwo() { |
| 225 return result_; | 227 return result_; |
| 226 } | 228 } |
| 227 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {} | 229 void IndexedDBFakeBackingStore::FakeTransaction::Rollback() {} |
| 228 | 230 |
| 229 } // namespace content | 231 } // namespace content |
| OLD | NEW |