commit | e1f238f19ef0508d041ea7ae87d4f7de61d09a37 | [log] [tgz] |
---|---|---|
author | Pavol Marko <[email protected]> | Tue Sep 05 18:58:42 2017 |
committer | Commit Bot <[email protected]> | Tue Sep 05 18:58:42 2017 |
tree | aeec409f041fed38b03fbc1e6540c3107e1a3ef3 | |
parent | e8597a0fb459021fa4e1e28eec4d79b5a71343cc [diff] [blame] |
Commit minimal migration status to local state prefs Commit minimal migration status to local state PrefService. Introduces a CommitPendingWrite function with a callback to be sure that prefs landed on disk. BUG=747907 Change-Id: I565ffbae7b8a1e934875101012c39c8a9841a139 Reviewed-on: https://chromium-review.googlesource.com/647454 Reviewed-by: Xiyuan Xia <[email protected]> Reviewed-by: Bernhard Bauer <[email protected]> Commit-Queue: Pavol Marko <[email protected]> Cr-Commit-Position: refs/heads/master@{#499693}
diff --git a/components/prefs/pref_service.cc b/components/prefs/pref_service.cc index a03daa04..fd1dea3b 100644 --- a/components/prefs/pref_service.cc +++ b/components/prefs/pref_service.cc
@@ -104,8 +104,12 @@ } void PrefService::CommitPendingWrite() { + CommitPendingWrite(base::OnceClosure()); +} + +void PrefService::CommitPendingWrite(base::OnceClosure done_callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - user_pref_store_->CommitPendingWrite(); + user_pref_store_->CommitPendingWrite(std::move(done_callback)); } void PrefService::SchedulePendingLossyWrites() {