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

Unified Diff: content/browser/dom_storage/local_storage_context_mojo.cc

Issue 2611743002: Integrate mojo localstorage implementation with DOMStorageContext API. (Closed)
Patch Set: add flush Created 3 years, 12 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/dom_storage/local_storage_context_mojo.cc
diff --git a/content/browser/dom_storage/local_storage_context_mojo.cc b/content/browser/dom_storage/local_storage_context_mojo.cc
index c9939f57850985b7622018479a949b996de10ef6..01d0c82eef583922947de48d079a797e777246b3 100644
--- a/content/browser/dom_storage/local_storage_context_mojo.cc
+++ b/content/browser/dom_storage/local_storage_context_mojo.cc
@@ -97,6 +97,11 @@ void LocalStorageContextMojo::DeleteStorageForPhysicalOrigin(
weak_ptr_factory_.GetWeakPtr(), origin));
}
+void LocalStorageContextMojo::Flush() {
+ for (const auto& it : level_db_wrappers_)
+ it.second->ScheduleImmediateCommit();
+}
+
void LocalStorageContextMojo::SetDatabaseForTesting(
leveldb::mojom::LevelDBDatabasePtr database) {
DCHECK_EQ(connection_state_, NO_CONNECTION);

Powered by Google App Engine
This is Rietveld 408576698