Index: chromeos/dbus/session_manager_client.h |
diff --git a/chromeos/dbus/session_manager_client.h b/chromeos/dbus/session_manager_client.h |
index 372890a48e3a6752b4a20851d7debe064e032974..2d0ca2219667ded017deeac3f0ebcd887b7524b1 100644 |
--- a/chromeos/dbus/session_manager_client.h |
+++ b/chromeos/dbus/session_manager_client.h |
@@ -151,6 +151,14 @@ class CHROMEOS_EXPORT SessionManagerClient : public DBusClient { |
// completion of the retrieve attempt, we will call the provided callback. |
virtual void RetrieveDevicePolicy(const RetrievePolicyCallback& callback) = 0; |
+ // Same as RetrieveDevicePolicy() but blocks until a reply is received, and |
+ // returns the policy synchronously. Returns an empty string if the method |
+ // call fails. |
+ // This may only be called in situations where blocking the UI thread is |
+ // considered acceptable (e.g. restarting the browser after a crash or after |
+ // a flag change). |
+ virtual std::string BlockingRetrieveDevicePolicy() = 0; |
stevenjb
2017/02/22 16:40:19
Since there is precedence for this already for use
Sergey Poromov
2017/02/28 14:01:17
Done.
|
+ |
// Fetches the user policy blob stored by the session manager for the given |
// |cryptohome_id|. Upon completion of the retrieve attempt, we will call the |
// provided callback. |
@@ -173,6 +181,16 @@ class CHROMEOS_EXPORT SessionManagerClient : public DBusClient { |
const std::string& account_id, |
const RetrievePolicyCallback& callback) = 0; |
+ // Same as RetrieveDeviceLocalAccountPolicy() but blocks until a reply is |
+ // received, and |
emaxx
2017/02/22 17:24:34
nit: Please reformat the comment.
Sergey Poromov
2017/02/28 14:01:17
Done.
|
+ // returns the policy synchronously. Returns an empty string if the method |
+ // call fails. |
stevenjb
2017/02/22 16:40:19
combine lines
Sergey Poromov
2017/02/28 14:01:17
Done.
|
+ // This may only be called in situations where blocking the UI thread is |
+ // considered acceptable (e.g. restarting the browser after a crash or after |
+ // a flag change). |
+ virtual std::string BlockingRetrieveDeviceLocalAccountPolicy( |
+ const std::string& account_id) = 0; |
+ |
// Used for StoreDevicePolicy, StorePolicyForUser and |
// StoreDeviceLocalAccountPolicy. Takes a boolean indicating whether the |
// operation was successful or not. |