 Chromium Code Reviews
 Chromium Code Reviews Issue 2772673002:
  mash: switch to the new pref service  (Closed)
    
  
    Issue 2772673002:
  mash: switch to the new pref service  (Closed) 
  | Index: ash/shell.h | 
| diff --git a/ash/shell.h b/ash/shell.h | 
| index 343af630921b20b4267869fcff45ed9de47d5453..2e5001e6078ce73a80aff945aee48d7d49d02c0d 100644 | 
| --- a/ash/shell.h | 
| +++ b/ash/shell.h | 
| @@ -25,6 +25,8 @@ | 
| #include "ui/wm/core/cursor_manager.h" | 
| #include "ui/wm/public/activation_change_observer.h" | 
| +class PrefService; | 
| + | 
| namespace aura { | 
| class RootWindow; | 
| class UserActivityForwarder; | 
| @@ -58,10 +60,6 @@ namespace gfx { | 
| class Insets; | 
| } | 
| -namespace preferences { | 
| -class PrefClientStore; | 
| -} | 
| - | 
| namespace ui { | 
| class UserActivityDetector; | 
| class UserActivityPowerManagerNotifier; | 
| @@ -360,7 +358,7 @@ class ASH_EXPORT Shell : public SessionStateObserver, | 
| LockStateController* lock_state_controller() { | 
| return lock_state_controller_.get(); | 
| } | 
| - preferences::PrefClientStore* pref_store() { return pref_store_.get(); } | 
| + ::PrefService* pref_service() { return pref_service_.get(); } | 
| 
jonross
2017/03/27 14:26:38
Global namespace?
 
tibell
2017/03/28 00:34:31
Done.
 | 
| PaletteDelegate* palette_delegate() { return palette_delegate_.get(); } | 
| ShellDelegate* shell_delegate() { return shell_delegate_.get(); } | 
| VideoDetector* video_detector() { return video_detector_.get(); } | 
| @@ -625,6 +623,8 @@ class ASH_EXPORT Shell : public SessionStateObserver, | 
| // SessionStateObserver: | 
| void SessionStateChanged(session_manager::SessionState state) override; | 
| + void OnPrefServiceInitialized(std::unique_ptr<::PrefService> pref_service); | 
| 
jonross
2017/03/27 14:26:38
Nit: doc that this is a callback for prefs::Connec
 
tibell
2017/03/28 00:34:31
Done.
 | 
| + | 
| static Shell* instance_; | 
| // Only valid in mash, for classic ash this is null. | 
| @@ -678,7 +678,7 @@ class ASH_EXPORT Shell : public SessionStateObserver, | 
| std::unique_ptr<::wm::VisibilityController> visibility_controller_; | 
| std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; | 
| std::unique_ptr<app_list::AppList> app_list_; | 
| - scoped_refptr<preferences::PrefClientStore> pref_store_; | 
| + std::unique_ptr<::PrefService> pref_service_; | 
| std::unique_ptr<ui::devtools::UiDevToolsServer> devtools_server_; | 
| std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; | 
| LinkHandlerModelFactory* link_handler_model_factory_; |