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

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: Settle on one name for the live blob journal. 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..03c5479ff830f483e375039ff8423fe62531f3d0 100644
--- a/content/browser/indexed_db/leveldb/leveldb_transaction.h
+++ b/content/browser/indexed_db/leveldb/leveldb_transaction.h
@@ -133,11 +133,18 @@ class CONTENT_EXPORT LevelDBTransaction
std::set<TransactionIterator*> iterators_;
};
+// The transaction actually does allow reading, but reads go straight to the
+// database, ignoring any writes cached in write_batch_, and writes are
+// write-through, without consolidation.
+// TODO(ericu): Rename to LevelDBSimpleTransaction or perhaps
+// LevelDBUncachedTransaction.
class LevelDBWriteOnlyTransaction {
public:
static scoped_ptr<LevelDBWriteOnlyTransaction> Create(LevelDBDatabase* db);
~LevelDBWriteOnlyTransaction();
+ 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();

Powered by Google App Engine
This is Rietveld 408576698