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

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

Issue 2649963002: Enable mojo localstorage to actually store on disk. (Closed)
Patch Set: Remove Sync() method, and instead make sure browser test waits long enough. Created 3 years, 10 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 240958579ab585c69272309a169e426239fea4f0..904a8e54ef794770bfe0b7f635c85fc011254ebf 100644
--- a/content/browser/dom_storage/local_storage_context_mojo.cc
+++ b/content/browser/dom_storage/local_storage_context_mojo.cc
@@ -271,6 +271,11 @@ void LocalStorageContextMojo::DeleteStorageForPhysicalOrigin(
}
void LocalStorageContextMojo::Flush() {
+ if (connection_state_ != CONNECTION_FINISHED) {
+ RunWhenConnected(base::BindOnce(&LocalStorageContextMojo::Flush,
+ weak_ptr_factory_.GetWeakPtr()));
+ return;
+ }
for (const auto& it : level_db_wrappers_)
it.second->level_db_wrapper()->ScheduleImmediateCommit();
}
« no previous file with comments | « content/browser/dom_storage/local_storage_context_mojo.h ('k') | content/renderer/dom_storage/local_storage_cached_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698