| 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 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 const IndexedDBKeyRange& key_range, | 140 const IndexedDBKeyRange& key_range, |
| 141 blink::WebIDBCursorDirection, | 141 blink::WebIDBCursorDirection, |
| 142 leveldb::Status*) override; | 142 leveldb::Status*) override; |
| 143 | 143 |
| 144 class FakeTransaction : public IndexedDBBackingStore::Transaction { | 144 class FakeTransaction : public IndexedDBBackingStore::Transaction { |
| 145 public: | 145 public: |
| 146 explicit FakeTransaction(leveldb::Status phase_two_result); | 146 explicit FakeTransaction(leveldb::Status phase_two_result); |
| 147 void Begin() override; | 147 void Begin() override; |
| 148 leveldb::Status CommitPhaseOne(scoped_refptr<BlobWriteCallback>) override; | 148 leveldb::Status CommitPhaseOne(scoped_refptr<BlobWriteCallback>) override; |
| 149 leveldb::Status CommitPhaseTwo() override; | 149 leveldb::Status CommitPhaseTwo() override; |
| 150 uint64_t GetTransactionSize() override; |
| 150 void Rollback() override; | 151 void Rollback() override; |
| 151 | 152 |
| 152 private: | 153 private: |
| 153 leveldb::Status result_; | 154 leveldb::Status result_; |
| 154 | 155 |
| 155 DISALLOW_COPY_AND_ASSIGN(FakeTransaction); | 156 DISALLOW_COPY_AND_ASSIGN(FakeTransaction); |
| 156 }; | 157 }; |
| 157 | 158 |
| 158 protected: | 159 protected: |
| 159 friend class base::RefCounted<IndexedDBFakeBackingStore>; | 160 friend class base::RefCounted<IndexedDBFakeBackingStore>; |
| 160 ~IndexedDBFakeBackingStore() override; | 161 ~IndexedDBFakeBackingStore() override; |
| 161 | 162 |
| 162 private: | 163 private: |
| 163 DISALLOW_COPY_AND_ASSIGN(IndexedDBFakeBackingStore); | 164 DISALLOW_COPY_AND_ASSIGN(IndexedDBFakeBackingStore); |
| 164 }; | 165 }; |
| 165 | 166 |
| 166 } // namespace content | 167 } // namespace content |
| 167 | 168 |
| 168 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ | 169 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ |
| OLD | NEW |