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

Unified Diff: chromeos/dbus/session_manager_client.h

Issue 2714493002: Load DeviceLocalAccount policy and DeviceSettings immediately on restore after Chrome crash. (Closed)
Patch Set: wrap Validator in unique_ptr Created 3 years, 10 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 | « chromeos/dbus/mock_session_manager_client.h ('k') | chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chromeos/dbus/mock_session_manager_client.h ('k') | chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698