Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / policy / cloud / remote_commands_invalidator_impl.h
blobaca0aef1e7f31202e075e5b485b89e7be4010234
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_POLICY_CLOUD_REMOTE_COMMANDS_INVALIDATOR_IMPL_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_REMOTE_COMMANDS_INVALIDATOR_IMPL_H_
8 #include "base/macros.h"
9 #include "chrome/browser/policy/cloud/remote_commands_invalidator.h"
10 #include "components/policy/core/common/cloud/cloud_policy_core.h"
11 #include "components/policy/core/common/cloud/cloud_policy_store.h"
13 namespace policy {
15 // Implementation of invalidator for remote commands services. This class
16 // listens to events from CloudPolicyCore and CloudPolicyStore and builds
17 // with RemoteCommandsInvalidator to complete the tasks.
18 class RemoteCommandsInvalidatorImpl : public RemoteCommandsInvalidator,
19 public CloudPolicyCore::Observer,
20 public CloudPolicyStore::Observer {
21 public:
22 explicit RemoteCommandsInvalidatorImpl(CloudPolicyCore* core);
24 // RemoteCommandsInvalidator:
25 void OnInitialize() override;
26 void OnShutdown() override;
27 void OnStart() override;
28 void OnStop() override;
29 void DoRemoteCommandsFetch() override;
31 // CloudPolicyCore::Observer:
32 void OnCoreConnected(CloudPolicyCore* core) override;
33 void OnRefreshSchedulerStarted(CloudPolicyCore* core) override;
34 void OnCoreDisconnecting(CloudPolicyCore* core) override;
35 void OnRemoteCommandsServiceStarted(CloudPolicyCore* core) override;
37 // CloudPolicyStore::Observer:
38 void OnStoreLoaded(CloudPolicyStore* store) override;
39 void OnStoreError(CloudPolicyStore* store) override;
41 private:
42 CloudPolicyCore* const core_;
44 DISALLOW_COPY_AND_ASSIGN(RemoteCommandsInvalidatorImpl);
47 } // namespace policy
49 #endif // CHROME_BROWSER_POLICY_CLOUD_REMOTE_COMMANDS_INVALIDATOR_IMPL_H_