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

Unified Diff: components/policy/core/common/cloud/cloud_policy_client.h

Issue 879233003: Initial RemoteCommandService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-commands
Patch Set: WIP Created 5 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: components/policy/core/common/cloud/cloud_policy_client.h
diff --git a/components/policy/core/common/cloud/cloud_policy_client.h b/components/policy/core/common/cloud/cloud_policy_client.h
index 4fefa864743c5f32ba3a94d1219c20c9f4d4bb97..a08576aaa084fe596d919ea3ef4a5cef85bc0375 100644
--- a/components/policy/core/common/cloud/cloud_policy_client.h
+++ b/components/policy/core/common/cloud/cloud_policy_client.h
@@ -18,6 +18,7 @@
#include "base/observer_list.h"
#include "base/time/time.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
+#include "components/policy/core/common/remote_commands/remote_command_job.h"
#include "components/policy/policy_export.h"
#include "policy/proto/device_management_backend.pb.h"
@@ -49,6 +50,10 @@ class POLICY_EXPORT CloudPolicyClient {
// succeeded, |status| is true.
typedef base::Callback<void(bool status)> StatusCallback;
+ typedef base::Callback<void(
bartfab (slow) 2015/02/12 14:29:19 Nit 1: Use C++ using= instead. Nit 2: Document thi
binjin 2015/02/16 22:46:23 Done.
+ const std::vector<enterprise_management::RemoteCommand>&)>
+ RemoteCommandCallback;
+
// Observer interface for state and policy changes.
class POLICY_EXPORT Observer {
public:
@@ -138,6 +143,13 @@ class POLICY_EXPORT CloudPolicyClient {
const enterprise_management::SessionStatusReportRequest* session_status,
const StatusCallback& callback);
+ // XXX
+ virtual void FetchRemoteCommands(
bartfab (slow) 2015/02/12 14:29:19 This should be covered by CloudPolicyClient's unit
binjin 2015/02/16 22:46:23 Done.
+ RemoteCommandJob::UniqueIDType last_command_id,
+ const std::vector<enterprise_management::RemoteCommandResult>&
+ command_results,
+ const RemoteCommandCallback& callback);
+
// Adds an observer to be called back upon policy and state changes.
void AddObserver(Observer* observer);
@@ -267,6 +279,14 @@ class POLICY_EXPORT CloudPolicyClient {
int net_error,
const enterprise_management::DeviceManagementResponse& response);
+ // XXX
+ void OnRemoteCommandsFetched(
+ const DeviceManagementRequestJob* job,
+ const RemoteCommandCallback& callback,
+ DeviceManagementStatus status,
+ int net_error,
+ const enterprise_management::DeviceManagementResponse& response);
+
// Helper to remove a job from request_jobs_.
void RemoveJob(const DeviceManagementRequestJob* job);

Powered by Google App Engine
This is Rietveld 408576698