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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 2759413002: Move PrefStoreManagerImpl into //services/preferences. (Closed)
Patch Set: Update newly-added test. Created 3 years, 9 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | services/preferences/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 5e2893153edffa2be8195665091c39632da6d995..cce1253528ea7d313cd6b756e0f0a9cec4a064e5 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -118,9 +118,10 @@
#include "extensions/features/features.h"
#include "ppapi/features/features.h"
#include "printing/features/features.h"
-#include "services/preferences/public/cpp/pref_store_manager_impl.h"
+#include "services/preferences/public/cpp/pref_service_main.h"
#include "services/preferences/public/interfaces/preferences.mojom.h"
#include "services/preferences/public/interfaces/tracked_preference_validation_delegate.mojom.h"
+#include "services/service_manager/public/cpp/service.h"
#include "ui/base/l10n/l10n_util.h"
#if defined(OS_CHROMEOS)
@@ -1067,12 +1068,11 @@ ProfileImpl::CreateMediaRequestContextForStoragePartition(
void ProfileImpl::RegisterInProcessServices(StaticServiceMap* services) {
if (base::FeatureList::IsEnabled(features::kPrefService)) {
content::ServiceInfo info;
- info.factory =
- base::Bind([]() -> std::unique_ptr<service_manager::Service> {
- return base::MakeUnique<prefs::PrefStoreManagerImpl>(
- prefs::PrefStoreManagerImpl::PrefStoreTypes(),
- content::BrowserThread::GetBlockingPool());
- });
+ info.factory = base::Bind(
+ &prefs::CreatePrefService, std::set<PrefValueStore::PrefStoreType>(),
+ make_scoped_refptr(content::BrowserThread::GetBlockingPool()));
+ info.task_runner = content::BrowserThread::GetTaskRunnerForThread(
+ content::BrowserThread::IO);
services->insert(std::make_pair(prefs::mojom::kPrefStoreServiceName, info));
}
}
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | services/preferences/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698