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

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

Issue 320833002: [IndexedDB] Use consistent enums on both sides of IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase patch. 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 virtual scoped_ptr<Cursor> OpenObjectStoreKeyCursor( 106 virtual scoped_ptr<Cursor> OpenObjectStoreKeyCursor(
107 Transaction* transaction, 107 Transaction* transaction,
108 int64 database_id, 108 int64 database_id,
109 int64 object_store_id, 109 int64 object_store_id,
110 const IndexedDBKeyRange& key_range, 110 const IndexedDBKeyRange& key_range,
111 indexed_db::CursorDirection, 111 blink::WebIDBCursorDirection,
112 leveldb::Status*) OVERRIDE; 112 leveldb::Status*) OVERRIDE;
113 virtual scoped_ptr<Cursor> OpenObjectStoreCursor( 113 virtual scoped_ptr<Cursor> OpenObjectStoreCursor(
114 Transaction* transaction, 114 Transaction* transaction,
115 int64 database_id, 115 int64 database_id,
116 int64 object_store_id, 116 int64 object_store_id,
117 const IndexedDBKeyRange& key_range, 117 const IndexedDBKeyRange& key_range,
118 indexed_db::CursorDirection, 118 blink::WebIDBCursorDirection,
119 leveldb::Status*) OVERRIDE; 119 leveldb::Status*) OVERRIDE;
120 virtual scoped_ptr<Cursor> OpenIndexKeyCursor( 120 virtual scoped_ptr<Cursor> OpenIndexKeyCursor(
121 Transaction* transaction, 121 Transaction* transaction,
122 int64 database_id, 122 int64 database_id,
123 int64 object_store_id, 123 int64 object_store_id,
124 int64 index_id, 124 int64 index_id,
125 const IndexedDBKeyRange& key_range, 125 const IndexedDBKeyRange& key_range,
126 indexed_db::CursorDirection, 126 blink::WebIDBCursorDirection,
127 leveldb::Status*) OVERRIDE; 127 leveldb::Status*) OVERRIDE;
128 virtual scoped_ptr<Cursor> OpenIndexCursor(Transaction* transaction, 128 virtual scoped_ptr<Cursor> OpenIndexCursor(Transaction* transaction,
129 int64 database_id, 129 int64 database_id,
130 int64 object_store_id, 130 int64 object_store_id,
131 int64 index_id, 131 int64 index_id,
132 const IndexedDBKeyRange& key_range, 132 const IndexedDBKeyRange& key_range,
133 indexed_db::CursorDirection, 133 blink::WebIDBCursorDirection,
134 leveldb::Status*) OVERRIDE; 134 leveldb::Status*) OVERRIDE;
135 135
136 class FakeTransaction : public IndexedDBBackingStore::Transaction { 136 class FakeTransaction : public IndexedDBBackingStore::Transaction {
137 public: 137 public:
138 explicit FakeTransaction(leveldb::Status phase_two_result); 138 explicit FakeTransaction(leveldb::Status phase_two_result);
139 virtual void Begin() OVERRIDE; 139 virtual void Begin() OVERRIDE;
140 virtual leveldb::Status CommitPhaseOne( 140 virtual leveldb::Status CommitPhaseOne(
141 scoped_refptr<BlobWriteCallback>) OVERRIDE; 141 scoped_refptr<BlobWriteCallback>) OVERRIDE;
142 virtual leveldb::Status CommitPhaseTwo() OVERRIDE; 142 virtual leveldb::Status CommitPhaseTwo() OVERRIDE;
143 virtual void Rollback() OVERRIDE; 143 virtual void Rollback() OVERRIDE;
144 144
145 private: 145 private:
146 leveldb::Status result_; 146 leveldb::Status result_;
147 147
148 DISALLOW_COPY_AND_ASSIGN(FakeTransaction); 148 DISALLOW_COPY_AND_ASSIGN(FakeTransaction);
149 }; 149 };
150 150
151 protected: 151 protected:
152 friend class base::RefCounted<IndexedDBFakeBackingStore>; 152 friend class base::RefCounted<IndexedDBFakeBackingStore>;
153 virtual ~IndexedDBFakeBackingStore(); 153 virtual ~IndexedDBFakeBackingStore();
154 154
155 DISALLOW_COPY_AND_ASSIGN(IndexedDBFakeBackingStore); 155 DISALLOW_COPY_AND_ASSIGN(IndexedDBFakeBackingStore);
156 }; 156 };
157 157
158 } // namespace content 158 } // namespace content
159 159
160 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ 160 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/indexed_db/indexed_db_fake_backing_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698