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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2635153002: Pref service: expose all read-only PrefStores through Mojo (Closed)
Patch Set: Address review comments 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/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 8b3d55ad2f7adc5e12ba527a16d2597eb98609a5..016df508fde6a3aedf2ac09c8cde227307457fa8 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -195,6 +195,7 @@
#include "ppapi/host/ppapi_host.h"
#include "printing/features/features.h"
#include "services/image_decoder/public/interfaces/constants.mojom.h"
+#include "services/preferences/public/cpp/pref_store_manager_impl.h"
#include "services/preferences/public/interfaces/preferences.mojom.h"
#include "services/service_manager/public/cpp/interface_provider.h"
#include "services/service_manager/public/cpp/interface_registry.h"
@@ -3233,6 +3234,20 @@ void ChromeContentBrowserClient::RegisterInProcessServices(
#endif // OS_CHROMEOS
}
+void ChromeContentBrowserClient::RegisterInProcessServices(
+ content::BrowserContext* browser_context,
+ StaticServiceMap* services) {
+ {
+ content::ServiceInfo info;
+ info.factory = base::Bind([] {
+ return std::unique_ptr<service_manager::Service>(
+ base::MakeUnique<prefs::PrefStoreManagerImpl>(
+ prefs::PrefStoreManagerImpl::PrefStoreTypes()));
+ });
+ services->insert(std::make_pair(prefs::mojom::kPrefStoreServiceName, info));
+ }
+}
+
void ChromeContentBrowserClient::RegisterOutOfProcessServices(
OutOfProcessServiceMap* services) {
#if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS)

Powered by Google App Engine
This is Rietveld 408576698