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

Unified Diff: chrome/browser/chromeos/dbus/session_manager_client.h

Issue 9961014: Add calls to store/retrieve user policy to SessionManagerClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment. Created 8 years, 8 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: chrome/browser/chromeos/dbus/session_manager_client.h
diff --git a/chrome/browser/chromeos/dbus/session_manager_client.h b/chrome/browser/chromeos/dbus/session_manager_client.h
index 1041b58dfdc732cff7e0de8d9c2d4c387a2eb561..a787fad283b827374d4d0c942591cbe61beea734 100644
--- a/chrome/browser/chromeos/dbus/session_manager_client.h
+++ b/chrome/browser/chromeos/dbus/session_manager_client.h
@@ -52,24 +52,34 @@ class SessionManagerClient {
// Stops the current session.
virtual void StopSession() = 0;
- // Used for RetrievePolicy. Takes a serialized protocol buffer as string.
+ // Used for RetrieveDevicePolicy and RetrieveUserPolicy. Takes a serialized
+ // protocol buffer as string. Upon success, we will pass a protobuf to the
+ // callback. On failure, we will pass "".
typedef base::Callback<void(const std::string&)> RetrievePolicyCallback;
- // Fetches the policy blob stored by the session manager. Upon
- // completion of the retrieve attempt, we will call the provided
- // callback. Policies are serialized protocol buffers. Upon success,
- // we will pass a protobuf to the callback. On failure, we will pass
- // "".
- virtual void RetrievePolicy(RetrievePolicyCallback callback) = 0;
+ // Fetches the device policy blob stored by the session manager. Upon
+ // completion of the retrieve attempt, we will call the provided callback.
+ virtual void RetrieveDevicePolicy(RetrievePolicyCallback callback) = 0;
- // Used for StorePolicyCallback. Takes a boolean indicating whether the
- // operation was successful or not.
+ // Fetches the user policy blob stored by the session manager for the
+ // currently signed-in user. Upon completion of the retrieve attempt, we will
+ // call the provided callback.
+ virtual void RetrieveUserPolicy(RetrievePolicyCallback callback) = 0;
+
+ // Used for StoreDevicePolicy and StoreUserPolicy. Takes a boolean indicating
+ // whether the operation was successful or not.
typedef base::Callback<void(bool)> StorePolicyCallback;
- // Attempts to store |policy_blob| asynchronously. Upon completion of
- // the store attempt, we will call callback.
- virtual void StorePolicy(const std::string& policy_bob,
- StorePolicyCallback callback) = 0;
+ // Attempts to asynchronously store |policy_blob| as device policy. Upon
+ // completion of the store attempt, we will call callback.
+ virtual void StoreDevicePolicy(const std::string& policy_blob,
+ StorePolicyCallback callback) = 0;
+
+ // Attempts to asynchronously store |policy_blob| as user policy for the
+ // currently signed-in user. Upon completion of the store attempt, we will
+ // call callback.
+ virtual void StoreUserPolicy(const std::string& policy_blob,
+ StorePolicyCallback callback) = 0;
// Creates the instance.
static SessionManagerClient* Create(DBusClientImplementationType type,
« no previous file with comments | « chrome/browser/chromeos/dbus/mock_session_manager_client.h ('k') | chrome/browser/chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698