Chromium Code Reviews| Index: chromeos/dbus/session_manager_client.h |
| diff --git a/chromeos/dbus/session_manager_client.h b/chromeos/dbus/session_manager_client.h |
| index b294b761c8b9c692d7414f78e8432d46d663ec21..e015f7f5a69d1b6a951b017bdc119953621e4bc3 100644 |
| --- a/chromeos/dbus/session_manager_client.h |
| +++ b/chromeos/dbus/session_manager_client.h |
| @@ -27,6 +27,18 @@ namespace chromeos { |
| // SessionManagerClient is used to communicate with the session manager. |
| class CHROMEOS_EXPORT SessionManagerClient : public DBusClient { |
| public: |
| + // The result type received from session manager on request to retrieve the |
| + // policy. |
|
emaxx
2017/04/18 15:03:17
Please explain in the comment the restriction that
igorcov
2017/04/20 14:52:29
Done.
|
| + enum RetrievePolicyResponseType { |
| + SUCCESS, // The policy retrieved successfully. |
| + SESSION_DOES_NOT_EXIST, // Retrieve policy request issued |
| + // before session started. |
| + OTHER_ERROR, // Other type of error while retrieving |
| + // policy. |
| + RETRIEVE_POLICY_RESPONSE_TYPE_COUNT // Has to be the last value of |
| + // enumeration. Used for UMA. |
| + }; |
| + |
| // Interface for observing changes from the session manager. |
| class Observer { |
| public: |
| @@ -142,10 +154,12 @@ class CHROMEOS_EXPORT SessionManagerClient : public DBusClient { |
| // Used for RetrieveDevicePolicy, RetrievePolicyForUser and |
| // RetrieveDeviceLocalAccountPolicy. Takes a serialized protocol buffer as |
| - // string. Upon success, we will pass a protobuf to the callback. On |
| - // failure, we will pass "". |
| + // string. Upon success, we will pass a protobuf and SUCCESS |response_type| |
| + // to the callback. On failure, we will pass "" and the details of error type |
| + // in |response_type|. |
| using RetrievePolicyCallback = |
| - base::Callback<void(const std::string& protobuf)>; |
| + base::Callback<void(const std::string& protobuf, |
| + const RetrievePolicyResponseType& response_type)>; |
| // Fetches the device policy blob stored by the session manager. Upon |
| // completion of the retrieve attempt, we will call the provided callback. |