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

Side by Side Diff: chrome/browser/chromeos/policy/device_ad_policy_manager.h

Issue 2486813002: Add DeviceADPolicyManager to provide AD policy. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_AD_POLICY_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_AD_POLICY_MANAGER_H_
7
8 #include <memory>
9
10 #include "components/policy/core/common/cloud/cloud_policy_store.h"
11 #include "components/policy/core/common/configuration_policy_provider.h"
12
13 namespace policy {
14
15 // ConfigurationPolicyProvider for policy from Active Directory. The policy is
16 // fetched from the Domain Controller by authpolicyd which stores it in session
17 // manager and from where it is loaded by DeviceADPolicyManager.
18 // TODO(tnagel): Wire RefreshPolicies() through to authpolicyd.
19 class DeviceADPolicyManager : public ConfigurationPolicyProvider,
emaxx 2016/11/11 15:25:08 I understand that unabbreviated "AD" will be quite
Thiemo Nagel 2016/11/16 19:11:01 I guess you're right. I'm converting it all, plea
20 public CloudPolicyStore::Observer {
21 public:
22 explicit DeviceADPolicyManager(std::unique_ptr<CloudPolicyStore> store);
23 ~DeviceADPolicyManager() override;
24
25 // ConfigurationPolicyProvider:
26 void Init(SchemaRegistry* registry) override;
27 void Shutdown() override;
28 bool IsInitializationComplete(PolicyDomain domain) const override;
29 void RefreshPolicies() override;
30
31 // CloudPolicyStore::Observer:
32 void OnStoreLoaded(CloudPolicyStore* cloud_policy_store) override;
33 void OnStoreError(CloudPolicyStore* cloud_policy_store) override;
34
35 const CloudPolicyStore* store() const { return store_.get(); }
36
37 private:
38 // Publishes the policy that's currently cached in the store.
39 void PublishPolicy();
40
41 std::unique_ptr<CloudPolicyStore> store_;
42 };
43
44 } // namespace policy
45
46 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_AD_POLICY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698