#include <map>
#include <string>
+#include <vector>
#include "base/callback.h"
#include "base/observer_list.h"
// Attempts to asynchronously store |policy_blob| as user policy for the given
// |username|. Upon completion of the store attempt, we will call callback.
- // The |policy_key| argument is not sent to the session manager, but is used
- // by the stub implementation to enable policy validation on desktop builds.
virtual void StorePolicyForUser(const std::string& username,
const std::string& policy_blob,
- const std::string& policy_key,
const StorePolicyCallback& callback) = 0;
// Sends a request to store a policy blob for the specified device-local
virtual void SetFlagsForUser(const std::string& username,
const std::vector<std::string>& flags) = 0;
+ typedef base::Callback<void(const std::vector<std::string>& state_keys)>
+ StateKeysCallback;
+
+ // Get the currently valid server-backed state keys for the device.
+ // Server-backed state keys are opaque, device-unique, time-dependent,
+ // client-determined identifiers that are used for keying state in the cloud
+ // for the device to retrieve after a device factory reset.
+ //
+ // The state keys are returned asynchronously via |callback|. The callback
+ // will be invoked with an empty state key vector in case of errors.
+ virtual void GetServerBackedStateKeys(const StateKeysCallback& callback) = 0;
+
// Creates the instance.
static SessionManagerClient* Create(DBusClientImplementationType type);