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

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

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge fixes [builds, untested] Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/leveldb/leveldb_transaction.cc
diff --git a/content/browser/indexed_db/leveldb/leveldb_transaction.cc b/content/browser/indexed_db/leveldb/leveldb_transaction.cc
index 5388d44c6f5ad13fbe09a8d0aa825446fe4a4f26..89e8471bfcd97355c31fc3d159141404f0f9d6ad 100644
--- a/content/browser/indexed_db/leveldb/leveldb_transaction.cc
+++ b/content/browser/indexed_db/leveldb/leveldb_transaction.cc
@@ -457,6 +457,27 @@ LevelDBWriteOnlyTransaction::~LevelDBWriteOnlyTransaction() {
write_batch_->Clear();
}
+void LevelDBWriteOnlyTransaction::Put(const StringPiece& key,
+ const std::string* value)
+{
+ DCHECK(!finished_);
+ write_batch_->Put(key, *value);
+}
+
+bool LevelDBWriteOnlyTransaction::Get(const StringPiece& key,
+ std::string* value, bool* found)
+{
+ *found = false;
+ DCHECK(!finished_);
+
+ bool ok = db_->Get(key, value, found);
+ if (!ok) {
+ DCHECK(!found);
+ return false;
+ }
+ return true;
+}
+
void LevelDBWriteOnlyTransaction::Remove(const StringPiece& key) {
DCHECK(!finished_);
write_batch_->Remove(key);

Powered by Google App Engine
This is Rietveld 408576698