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

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

Issue 397323003: LevelDBDatabase::Compact compacts db (on disk) w/o requiring reopen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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_database.cc
diff --git a/content/browser/indexed_db/leveldb/leveldb_database.cc b/content/browser/indexed_db/leveldb/leveldb_database.cc
index 8bcb517db41c1b2ba5b5a97fa89292b63a286e31..dd4f085c96098e8f01e0e4fb8ae40b4e28425edf 100644
--- a/content/browser/indexed_db/leveldb/leveldb_database.cc
+++ b/content/browser/indexed_db/leveldb/leveldb_database.cc
@@ -395,6 +395,7 @@ void LevelDBDatabase::Compact(const base::StringPiece& start,
const base::StringPiece& stop) {
const leveldb::Slice start_slice = MakeSlice(start);
const leveldb::Slice stop_slice = MakeSlice(stop);
+ db_->Write(leveldb::WriteOptions(), NULL);
jsbell 2014/07/17 18:33:24 Please add a comment explaining why this is here.
cmumford 2014/07/17 20:51:42 Done.
db_->CompactRange(&start_slice, &stop_slice);
}

Powered by Google App Engine
This is Rietveld 408576698