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

Unified Diff: ash/shell.h

Issue 2827193004: Make PrefService available in *ash (Closed)
Patch Set: sky's comments Created 3 years, 8 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: ash/shell.h
diff --git a/ash/shell.h b/ash/shell.h
index 27fdd01267fa128d50b4923a1e829320af92683d..0a5fb1535017445c8b0bfde0789d97c1c1707e22 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -364,7 +364,6 @@ class ASH_EXPORT Shell : public SessionObserver,
LockStateController* lock_state_controller() {
return lock_state_controller_.get();
}
- PrefService* pref_service() { return pref_service_.get(); }
PaletteDelegate* palette_delegate() { return palette_delegate_.get(); }
ShellDelegate* shell_delegate() { return shell_delegate_.get(); }
VideoDetector* video_detector() { return video_detector_.get(); }
@@ -422,6 +421,17 @@ class ASH_EXPORT Shell : public SessionObserver,
// TODO(jamescook): Move to Shelf.
void UpdateShelfVisibility();
+ // Gets the current active user pref service.
+ // In classic ash, it will be null if there's no active user.
+ // In the case of mash, it can be null if it failed to or hasn't yet
+ // connected to the pref service.
+ //
+ // NOTE: Users of this pref service MUST listen to
+ // ash::SessionObserver::OnActiveUserSessionChanged() and recall this function
+ // to get the newly activated user's pref service, and use it to re-read the
+ // desired stored settings.
+ PrefService* GetActiveUserPrefService() const;
+
// Returns WebNotificationTray on the primary root window.
WebNotificationTray* GetWebNotificationTray();
« ash/mus/shell_delegate_mus.cc ('K') | « ash/mus/shell_delegate_mus.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698