summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorbinjin <binjin@chromium.org>2015-05-15 09:59:15 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-15 17:00:04 +0000
commit9b94f2db07ffd0bad793e960f7a2d1cb428db7ea (patch)
tree207e67d3b56a26d6eb9f2496a283ad12997f00b8 /components
parent9cb8498a6318eb3aef01d6f4aafa8be15ea60347 (diff)
downloadchromium_src-9b94f2db07ffd0bad793e960f7a2d1cb428db7ea.zip
chromium_src-9b94f2db07ffd0bad793e960f7a2d1cb428db7ea.tar.gz
chromium_src-9b94f2db07ffd0bad793e960f7a2d1cb428db7ea.tar.bz2
Initial RemoteCommandsInvalidator
This CL adds the invalidator class for remote commands service. BUG=480982 Review URL: https://codereview.chromium.org/1094493003 Cr-Commit-Position: refs/heads/master@{#330114}
Diffstat (limited to 'components')
-rw-r--r--components/policy/core/common/cloud/cloud_policy_core.cc6
-rw-r--r--components/policy/core/common/cloud/cloud_policy_core.h4
-rw-r--r--components/policy/proto/device_management_backend.proto12
3 files changed, 22 insertions, 0 deletions
diff --git a/components/policy/core/common/cloud/cloud_policy_core.cc b/components/policy/core/common/cloud/cloud_policy_core.cc
index f1f5fca..302808e 100644
--- a/components/policy/core/common/cloud/cloud_policy_core.cc
+++ b/components/policy/core/common/cloud/cloud_policy_core.cc
@@ -19,6 +19,10 @@ namespace policy {
CloudPolicyCore::Observer::~Observer() {}
+void CloudPolicyCore::Observer::OnRemoteCommandsServiceStarted(
+ CloudPolicyCore* core) {
+}
+
CloudPolicyCore::CloudPolicyCore(
const std::string& policy_type,
const std::string& settings_entity_id,
@@ -59,6 +63,8 @@ void CloudPolicyCore::StartRemoteCommandsService(
// Do an initial remote commands fetch immediately.
remote_commands_service_->FetchRemoteCommands();
+
+ FOR_EACH_OBSERVER(Observer, observers_, OnRemoteCommandsServiceStarted(this));
}
void CloudPolicyCore::RefreshSoon() {
diff --git a/components/policy/core/common/cloud/cloud_policy_core.h b/components/policy/core/common/cloud/cloud_policy_core.h
index 031aa34..7a9bf59 100644
--- a/components/policy/core/common/cloud/cloud_policy_core.h
+++ b/components/policy/core/common/cloud/cloud_policy_core.h
@@ -50,6 +50,10 @@ class POLICY_EXPORT CloudPolicyCore {
// Called before the core is disconnected.
virtual void OnCoreDisconnecting(CloudPolicyCore* core) = 0;
+
+ // Called after the remote commands service is started. Defaults to be
+ // empty.
+ virtual void OnRemoteCommandsServiceStarted(CloudPolicyCore* core);
};
// |task_runner| is the runner for policy refresh tasks.
diff --git a/components/policy/proto/device_management_backend.proto b/components/policy/proto/device_management_backend.proto
index 37322aa..aab6a9e 100644
--- a/components/policy/proto/device_management_backend.proto
+++ b/components/policy/proto/device_management_backend.proto
@@ -350,6 +350,18 @@ message PolicyData {
// Indicates the state that the device should be in.
optional DeviceState device_state = 17;
+ // The object source which hosts command queue objects within the
+ // invalidation service. This value is combined with
+ // command_invalidation_name to form the object ID used to
+ // register for invalidations to the command queue.
+ optional int32 command_invalidation_source = 18;
+
+ // The name which uniquely identifies this device’s queue within
+ // the invalidation service object source. This value is combined
+ // with command_invalidation_source to form the object ID used to
+ // register for invalidations to the command queue.
+ optional bytes command_invalidation_name = 19;
+
// The free-text location info the admin enters to associate the device
// with a location.
optional string annotated_location = 20;