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

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

Issue 2597353002: Add callback to LevelDBWrapperImpl to allow extra operations on commit. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | content/browser/dom_storage/local_storage_context_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/local_storage_context_mojo.h
diff --git a/content/browser/dom_storage/local_storage_context_mojo.h b/content/browser/dom_storage/local_storage_context_mojo.h
index e14f963dce1fedcb5ee11831797bb95fc345647e..b8b9fb1df09912d2792a4b202138723558e524bb 100644
--- a/content/browser/dom_storage/local_storage_context_mojo.h
+++ b/content/browser/dom_storage/local_storage_context_mojo.h
@@ -37,6 +37,8 @@ class CONTENT_EXPORT LocalStorageContextMojo {
private:
void OnLevelDBWrapperHasNoBindings(const url::Origin& origin);
+ std::vector<leveldb::mojom::BatchedOperationPtr>
+ OnLevelDBWrapperPrepareToCommit();
void OnUserServiceConnectionComplete();
void OnUserServiceConnectionError();
@@ -59,6 +61,7 @@ class CONTENT_EXPORT LocalStorageContextMojo {
CONNECTION_IN_PROGRESS,
CONNECTION_FINISHED
} connection_state_ = NO_CONNECTION;
+ bool database_initialized_ = false;
std::unique_ptr<service_manager::Connection> file_service_connection_;
@@ -68,7 +71,7 @@ class CONTENT_EXPORT LocalStorageContextMojo {
leveldb::mojom::LevelDBServicePtr leveldb_service_;
leveldb::mojom::LevelDBDatabasePtr database_;
- std::vector<base::Closure> on_database_opened_callbacks_;
+ std::vector<base::OnceClosure> on_database_opened_callbacks_;
// Maps between an origin and its prefixed LevelDB view.
std::map<url::Origin, std::unique_ptr<LevelDBWrapperImpl>> level_db_wrappers_;
« no previous file with comments | « no previous file | content/browser/dom_storage/local_storage_context_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698