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

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

Issue 2759413002: Move PrefStoreManagerImpl into //services/preferences. (Closed)
Patch Set: 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
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 7e58befa635986dbc5b42a85f2275f5fe5e262a0..d3f3f309ce46f4009e822c0e45851e9d6c91a977 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -117,9 +117,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)
@@ -1064,12 +1065,9 @@ ProfileImpl::CreateMediaRequestContextForStoragePartition(
void ProfileImpl::RegisterInProcessServices(StaticServiceMap* services) {
if (base::FeatureList::IsEnabled(features::kPrefService)) {
content::ServiceInfo info;
Mike Lerman 2017/03/21 13:32:40 You're iterating on this within the Profiles direc
Sam McNally 2017/03/21 23:10:51 Unfortunately, those aren't viable options due to
- 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()));
services->insert(std::make_pair(prefs::mojom::kPrefStoreServiceName, info));
}
}

Powered by Google App Engine
This is Rietveld 408576698