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

Unified Diff: chromeos/dbus/session_manager_client.h

Issue 2714493002: Load DeviceLocalAccount policy and DeviceSettings immediately on restore after Chrome crash. (Closed)
Patch Set: add flag to correctly process LoadImmediately() call 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
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.

Powered by Google App Engine
This is Rietveld 408576698