1 // Copyright 2017 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/prefs/persistent_pref_store.h"
6 #include "base/task/sequenced_task_runner.h"
10 void PersistentPrefStore::CommitPendingWrite(
11 base::OnceClosure reply_callback,
12 base::OnceClosure synchronous_done_callback) {
13 // Default behavior for PersistentPrefStore implementation that don't issue
14 // disk operations: schedule the callback immediately.
15 // |synchronous_done_callback| is allowed to be invoked synchronously (and
16 // must be here since we have no other way to post it which isn't the current
19 if (synchronous_done_callback)
20 std::move(synchronous_done_callback).Run();
23 base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
24 FROM_HERE, std::move(reply_callback));
28 bool PersistentPrefStore::IsInMemoryPrefStore() const {