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

Unified Diff: content/browser/indexed_db/leveldb/leveldb_transaction.h

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle the rest of Josh's feedback. Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/leveldb/leveldb_transaction.h
diff --git a/content/browser/indexed_db/leveldb/leveldb_transaction.h b/content/browser/indexed_db/leveldb/leveldb_transaction.h
index b7b5d64df1ef08c2dba5796342fbe80da548154a..cc5639ae39272071e80990b950be1c117aa6b0e5 100644
--- a/content/browser/indexed_db/leveldb/leveldb_transaction.h
+++ b/content/browser/indexed_db/leveldb/leveldb_transaction.h
@@ -133,16 +133,20 @@ class CONTENT_EXPORT LevelDBTransaction
std::set<TransactionIterator*> iterators_;
};
-class LevelDBWriteOnlyTransaction {
+// Reads go straight to the database, ignoring any writes cached in
+// write_batch_, and writes are write-through, without consolidation.
+class LevelDBUncachedTransaction {
public:
- static scoped_ptr<LevelDBWriteOnlyTransaction> Create(LevelDBDatabase* db);
+ static scoped_ptr<LevelDBUncachedTransaction> Create(LevelDBDatabase* db);
- ~LevelDBWriteOnlyTransaction();
+ ~LevelDBUncachedTransaction();
+ void Put(const base::StringPiece& key, const std::string* value);
+ bool Get(const base::StringPiece& key, std::string* value, bool* found);
void Remove(const base::StringPiece& key);
bool Commit();
private:
- explicit LevelDBWriteOnlyTransaction(LevelDBDatabase* db);
+ explicit LevelDBUncachedTransaction(LevelDBDatabase* db);
LevelDBDatabase* db_;
scoped_ptr<LevelDBWriteBatch> write_batch_;

Powered by Google App Engine
This is Rietveld 408576698