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

Unified Diff: chrome/browser/chromeos/chrome_interface_factory.cc

Issue 2474653003: PreferencesManager (Closed)
Patch Set: Revert Example Created 4 years 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/chromeos/chrome_interface_factory.cc
diff --git a/chrome/browser/chromeos/chrome_interface_factory.cc b/chrome/browser/chromeos/chrome_interface_factory.cc
index d6824f6fa48198e58ad61f820bdd0af1bd34375e..ccde4d9b0e0c9d07c576d970e40568a6a9c54a14 100644
--- a/chrome/browser/chromeos/chrome_interface_factory.cc
+++ b/chrome/browser/chromeos/chrome_interface_factory.cc
@@ -16,6 +16,7 @@
#include "base/threading/thread_checker.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
+#include "chrome/browser/prefs/preferences_connection_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/app_list/app_list_presenter_service.h"
@@ -28,6 +29,7 @@
#include "content/public/common/service_manager_connection.h"
#include "mash/public/interfaces/launchable.mojom.h"
#include "mojo/public/cpp/bindings/binding_set.h"
+#include "services/preferences/public/interfaces/preferences.mojom.h"
#include "services/service_manager/public/cpp/connection.h"
#include "services/service_manager/public/cpp/interface_registry.h"
#include "ui/app_list/presenter/app_list_presenter.mojom.h"
@@ -124,6 +126,13 @@ class FactoryImpl {
std::move(request));
}
+ void BindRequest(prefs::mojom::PreferencesManagerRequest request) {
+ if (!preferences_connection_manager_)
+ preferences_connection_manager_ =
+ base::MakeUnique<chrome::PreferencesConnectionManager>();
+ preferences_connection_manager_->ProcessRequest(std::move(request));
sky 2016/12/06 23:37:37 file-bug-later: It would be nice if naming was con
jonross 2016/12/07 00:32:23 As in unify all naming within this file?
+ }
+
void BindRequest(ash::mojom::WallpaperManagerRequest request) {
WallpaperManager::Get()->BindRequest(std::move(request));
}
@@ -148,6 +157,8 @@ class FactoryImpl {
std::unique_ptr<ChromeLaunchable> launchable_;
std::unique_ptr<ChromeNewWindowClient> new_window_client_;
mojo::BindingSet<ash::mojom::NewWindowClient> new_window_client_bindings_;
+ std::unique_ptr<chrome::PreferencesConnectionManager>
+ preferences_connection_manager_;
std::unique_ptr<VolumeController> volume_controller_;
std::unique_ptr<AppListPresenterService> app_list_presenter_service_;
mojo::BindingSet<app_list::mojom::AppListPresenter>
@@ -179,6 +190,8 @@ bool ChromeInterfaceFactory::OnConnect(
main_thread_task_runner_);
FactoryImpl::AddFactory<ash::mojom::NewWindowClient>(
registry, main_thread_task_runner_);
+ FactoryImpl::AddFactory<prefs::mojom::PreferencesManager>(
+ registry, main_thread_task_runner_);
FactoryImpl::AddFactory<ash::mojom::VolumeController>(
registry, main_thread_task_runner_);
FactoryImpl::AddFactory<ash::mojom::WallpaperManager>(

Powered by Google App Engine
This is Rietveld 408576698