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

Unified Diff: chrome/browser/ui/ash/session_controller_client.h

Issue 2873453003: cros: Update ash when prefs related to lock are changed (Closed)
Patch Set: fix nits Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/ash/session_controller_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | chrome/browser/ui/ash/session_controller_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698