Index: components/prefs/json_pref_store.h |
diff --git a/components/prefs/json_pref_store.h b/components/prefs/json_pref_store.h |
index 72a06cc90e9e313b04971ec3c1e2886d94f6f860..6284b8d5478df39110f532e564d76e44bffc3e3d 100644 |
--- a/components/prefs/json_pref_store.h |
+++ b/components/prefs/json_pref_store.h |
@@ -19,7 +19,6 @@ |
#include "base/macros.h" |
#include "base/memory/weak_ptr.h" |
#include "base/observer_list.h" |
-#include "base/task_scheduler/post_task.h" |
#include "base/threading/non_thread_safe.h" |
#include "components/prefs/base_prefs_export.h" |
#include "components/prefs/persistent_pref_store.h" |
@@ -63,18 +62,13 @@ |
const base::FilePath& pref_filename, |
base::SequencedWorkerPool* worker_pool); |
- // |pref_filename| is the path to the file to read prefs from. It is incorrect |
- // to create multiple JsonPrefStore with the same |pref_filename|. |
- // |sequenced_task_runner| is used for asynchronous reads and writes. It must |
- // have the base::TaskShutdownBehavior::BLOCK_SHUTDOWN and base::MayBlock() |
- // traits. Unless external tasks need to run on the same sequence as |
- // JsonPrefStore tasks, keep the default value. |
- JsonPrefStore(const base::FilePath& pref_filename, |
- scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner = |
- base::CreateSequencedTaskRunnerWithTraits( |
- {base::MayBlock(), |
- base::TaskShutdownBehavior::BLOCK_SHUTDOWN}), |
- std::unique_ptr<PrefFilter> pref_filter = nullptr); |
+ // |sequenced_task_runner| must be a shutdown-blocking task runner, ideally |
+ // created by the GetTaskRunnerForFile() method above. |
+ // |pref_filename| is the path to the file to read prefs from. |
+ JsonPrefStore( |
+ const base::FilePath& pref_filename, |
+ const scoped_refptr<base::SequencedTaskRunner>& sequenced_task_runner, |
+ std::unique_ptr<PrefFilter> pref_filter); |
// PrefStore overrides: |
bool GetValue(const std::string& key, |