Index: chrome/browser/ui/ash/session_controller_client.h |
diff --git a/chrome/browser/ui/ash/session_controller_client.h b/chrome/browser/ui/ash/session_controller_client.h |
index 9fffbe0a47eac7d325d190d37d70297a51780446..a7e4dc4cd8e32392190d1d8ac103d21c5f7ee346 100644 |
--- a/chrome/browser/ui/ash/session_controller_client.h |
+++ b/chrome/browser/ui/ash/session_controller_client.h |
@@ -5,6 +5,8 @@ |
#ifndef CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_ |
#define CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_ |
+#include <vector> |
+ |
#include "ash/public/interfaces/session_controller.mojom.h" |
#include "base/callback_forward.h" |
#include "base/gtest_prod_util.h" |
@@ -18,6 +20,7 @@ |
#include "mojo/public/cpp/bindings/binding.h" |
class Profile; |
+class PrefChangeRegistrar; |
namespace ash { |
enum class AddUserSessionPolicy; |
@@ -97,6 +100,7 @@ class SessionControllerClient |
private: |
FRIEND_TEST_ALL_PREFIXES(SessionControllerClientTest, SendUserSession); |
FRIEND_TEST_ALL_PREFIXES(SessionControllerClientTest, SupervisedUser); |
+ FRIEND_TEST_ALL_PREFIXES(SessionControllerClientTest, UserPrefsChange); |
// Called when the login profile is ready. |
void OnLoginUserProfilePrepared(Profile* profile); |
@@ -131,6 +135,11 @@ class SessionControllerClient |
content::NotificationRegistrar registrar_; |
+ // Pref change observers to update session info when a relevant user pref |
+ // changes. There is one observer per user and they have no particular order, |
+ // i.e. they don't much the user session order. |
+ std::vector<std::unique_ptr<PrefChangeRegistrar>> pref_change_registrars_; |
+ |
// Used to suppress duplicate IPCs to ash. |
ash::mojom::SessionInfoPtr last_sent_session_info_; |
ash::mojom::UserSessionPtr last_sent_user_session_; |