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..b294b761c8b9c692d7414f78e8432d46d663ec21 100644 |
--- a/chromeos/dbus/session_manager_client.h |
+++ b/chromeos/dbus/session_manager_client.h |
@@ -151,6 +151,15 @@ 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). |
+ // TODO: Get rid of blocking calls (crbug.com/160522). |
+ virtual std::string BlockingRetrieveDevicePolicy() = 0; |
+ |
// 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. |
@@ -164,6 +173,7 @@ class CHROMEOS_EXPORT SessionManagerClient : public DBusClient { |
// 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). |
+ // TODO: Get rid of blocking calls (crbug.com/160522). |
virtual std::string BlockingRetrievePolicyForUser( |
const cryptohome::Identification& cryptohome_id) = 0; |
@@ -173,6 +183,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 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). |
+ // TODO: Get rid of blocking calls (crbug.com/160522). |
+ 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. |