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

Unified Diff: services/preferences/persistent_pref_store_factory.cc

Issue 2745563005: Pref service: add support for tracked prefs. (Closed)
Patch Set: deflake tests Created 3 years, 8 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: services/preferences/persistent_pref_store_factory.cc
diff --git a/services/preferences/persistent_pref_store_factory.cc b/services/preferences/persistent_pref_store_factory.cc
index ef63057bcc19eb1569e14c1e73906d72d18ee0b2..587ac96d1828ed0ee3995e1f8cb911f595f94c70 100644
--- a/services/preferences/persistent_pref_store_factory.cc
+++ b/services/preferences/persistent_pref_store_factory.cc
@@ -10,6 +10,7 @@
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_filter.h"
#include "services/preferences/persistent_pref_store_impl.h"
+#include "services/preferences/tracked/tracked_persistent_pref_store_factory.h"
namespace prefs {
namespace {
@@ -23,7 +24,7 @@ std::unique_ptr<PersistentPrefStoreImpl> CreateSimplePersistentPrefStore(
JsonPrefStore::GetTaskRunnerForFile(
config->pref_filename.DirName(), worker_pool),
nullptr),
- nullptr, std::move(on_initialized));
+ std::move(on_initialized));
}
} // namespace
@@ -37,6 +38,12 @@ std::unique_ptr<PersistentPrefStoreImpl> CreatePersistentPrefStore(
std::move(configuration->get_simple_configuration()), worker_pool,
std::move(on_initialized));
}
+ if (configuration->is_tracked_configuration()) {
+ return base::MakeUnique<PersistentPrefStoreImpl>(
+ CreateTrackedPersistentPrefStore(
+ std::move(configuration->get_tracked_configuration()), worker_pool),
+ std::move(on_initialized));
+ }
NOTREACHED();
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698