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

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: DeleteRange now seems to work. Created 6 years, 7 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 int64 object_store_id, 83 int64 object_store_id,
84 int64 index_id) OVERRIDE; 84 int64 index_id) OVERRIDE;
85 virtual leveldb::Status PutIndexDataForRecord(Transaction*, 85 virtual leveldb::Status PutIndexDataForRecord(Transaction*,
86 int64 database_id, 86 int64 database_id,
87 int64 object_store_id, 87 int64 object_store_id,
88 int64 index_id, 88 int64 index_id,
89 const IndexedDBKey&, 89 const IndexedDBKey&,
90 const RecordIdentifier&) 90 const RecordIdentifier&)
91 OVERRIDE; 91 OVERRIDE;
92 virtual void ReportBlobUnused(int64 database_id, int64 blob_key) OVERRIDE; 92 virtual void ReportBlobUnused(int64 database_id, int64 blob_key) OVERRIDE;
93
94 virtual scoped_ptr<Cursor> OpenObjectStoreKeyCursor( 93 virtual scoped_ptr<Cursor> OpenObjectStoreKeyCursor(
95 Transaction* transaction, 94 Transaction* transaction,
96 int64 database_id, 95 int64 database_id,
97 int64 object_store_id, 96 int64 object_store_id,
98 const IndexedDBKeyRange& key_range, 97 const IndexedDBKeyRange& key_range,
99 indexed_db::CursorDirection, 98 indexed_db::CursorDirection,
100 leveldb::Status*) OVERRIDE; 99 leveldb::Status*) OVERRIDE;
101 virtual scoped_ptr<Cursor> OpenObjectStoreCursor( 100 virtual scoped_ptr<Cursor> OpenObjectStoreCursor(
102 Transaction* transaction, 101 Transaction* transaction,
103 int64 database_id, 102 int64 database_id,
(...skipping 12 matching lines...) Expand all
116 virtual scoped_ptr<Cursor> OpenIndexCursor(Transaction* transaction, 115 virtual scoped_ptr<Cursor> OpenIndexCursor(Transaction* transaction,
117 int64 database_id, 116 int64 database_id,
118 int64 object_store_id, 117 int64 object_store_id,
119 int64 index_id, 118 int64 index_id,
120 const IndexedDBKeyRange& key_range, 119 const IndexedDBKeyRange& key_range,
121 indexed_db::CursorDirection, 120 indexed_db::CursorDirection,
122 leveldb::Status*) OVERRIDE; 121 leveldb::Status*) OVERRIDE;
123 122
124 class FakeTransaction : public IndexedDBBackingStore::Transaction { 123 class FakeTransaction : public IndexedDBBackingStore::Transaction {
125 public: 124 public:
126 FakeTransaction(bool result); 125 FakeTransaction(leveldb::Status phase_two_result);
127 virtual void Begin() OVERRIDE; 126 virtual void Begin() OVERRIDE;
128 virtual leveldb::Status Commit() OVERRIDE; 127 virtual leveldb::Status CommitPhaseOne(
128 scoped_refptr<BlobWriteCallback>) OVERRIDE;
129 virtual leveldb::Status CommitPhaseTwo() OVERRIDE;
129 virtual void Rollback() OVERRIDE; 130 virtual void Rollback() OVERRIDE;
130 131
131 private: 132 private:
132 bool result_; 133 leveldb::Status result_;
133 }; 134 };
134 135
135 protected: 136 protected:
136 friend class base::RefCounted<IndexedDBFakeBackingStore>; 137 friend class base::RefCounted<IndexedDBFakeBackingStore>;
137 virtual ~IndexedDBFakeBackingStore(); 138 virtual ~IndexedDBFakeBackingStore();
138 }; 139 };
139 140
140 } // namespace content 141 } // namespace content
141 142
142 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ 143 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698