Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: content/browser/indexed_db/indexed_db_fake_backing_store.h

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged out--bot failed due to staleness. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <vector> 8 #include <vector>
9 9
10 #include "content/browser/indexed_db/indexed_db_backing_store.h" 10 #include "content/browser/indexed_db/indexed_db_backing_store.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 int64 object_store_id, 96 int64 object_store_id,
97 int64 index_id) OVERRIDE; 97 int64 index_id) OVERRIDE;
98 virtual leveldb::Status PutIndexDataForRecord(Transaction*, 98 virtual leveldb::Status PutIndexDataForRecord(Transaction*,
99 int64 database_id, 99 int64 database_id,
100 int64 object_store_id, 100 int64 object_store_id,
101 int64 index_id, 101 int64 index_id,
102 const IndexedDBKey&, 102 const IndexedDBKey&,
103 const RecordIdentifier&) 103 const RecordIdentifier&)
104 OVERRIDE; 104 OVERRIDE;
105 virtual void ReportBlobUnused(int64 database_id, int64 blob_key) OVERRIDE; 105 virtual void ReportBlobUnused(int64 database_id, int64 blob_key) OVERRIDE;
106
107 virtual scoped_ptr<Cursor> OpenObjectStoreKeyCursor( 106 virtual scoped_ptr<Cursor> OpenObjectStoreKeyCursor(
108 Transaction* transaction, 107 Transaction* transaction,
109 int64 database_id, 108 int64 database_id,
110 int64 object_store_id, 109 int64 object_store_id,
111 const IndexedDBKeyRange& key_range, 110 const IndexedDBKeyRange& key_range,
112 indexed_db::CursorDirection, 111 indexed_db::CursorDirection,
113 leveldb::Status*) OVERRIDE; 112 leveldb::Status*) OVERRIDE;
114 virtual scoped_ptr<Cursor> OpenObjectStoreCursor( 113 virtual scoped_ptr<Cursor> OpenObjectStoreCursor(
115 Transaction* transaction, 114 Transaction* transaction,
116 int64 database_id, 115 int64 database_id,
(...skipping 12 matching lines...) Expand all
129 virtual scoped_ptr<Cursor> OpenIndexCursor(Transaction* transaction, 128 virtual scoped_ptr<Cursor> OpenIndexCursor(Transaction* transaction,
130 int64 database_id, 129 int64 database_id,
131 int64 object_store_id, 130 int64 object_store_id,
132 int64 index_id, 131 int64 index_id,
133 const IndexedDBKeyRange& key_range, 132 const IndexedDBKeyRange& key_range,
134 indexed_db::CursorDirection, 133 indexed_db::CursorDirection,
135 leveldb::Status*) OVERRIDE; 134 leveldb::Status*) OVERRIDE;
136 135
137 class FakeTransaction : public IndexedDBBackingStore::Transaction { 136 class FakeTransaction : public IndexedDBBackingStore::Transaction {
138 public: 137 public:
139 FakeTransaction(bool result); 138 FakeTransaction(leveldb::Status phase_two_result);
140 virtual void Begin() OVERRIDE; 139 virtual void Begin() OVERRIDE;
141 virtual leveldb::Status Commit() OVERRIDE; 140 virtual leveldb::Status CommitPhaseOne(
141 scoped_refptr<BlobWriteCallback>) OVERRIDE;
142 virtual leveldb::Status CommitPhaseTwo() OVERRIDE;
142 virtual void Rollback() OVERRIDE; 143 virtual void Rollback() OVERRIDE;
143 144
144 private: 145 private:
145 bool result_; 146 leveldb::Status result_;
146 }; 147 };
147 148
148 protected: 149 protected:
149 friend class base::RefCounted<IndexedDBFakeBackingStore>; 150 friend class base::RefCounted<IndexedDBFakeBackingStore>;
150 virtual ~IndexedDBFakeBackingStore(); 151 virtual ~IndexedDBFakeBackingStore();
151 }; 152 };
152 153
153 } // namespace content 154 } // namespace content
154 155
155 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ 156 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698