OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTENSION_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTENSION_TRACKER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTENSION_TRACKER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTENSION_TRACKER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 10 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
11 | 11 |
12 namespace policy { | 12 namespace policy { |
13 | 13 |
14 struct DeviceLocalAccount; | 14 struct DeviceLocalAccount; |
15 class SchemaRegistry; | 15 class SchemaRegistry; |
16 | 16 |
17 // Helper class that keeps all the extensions that a device-local account uses | 17 // Helper class that keeps all the extensions that a device-local account uses |
18 // registered in a SchemaRegistry. | 18 // registered in a SchemaRegistry. |
19 class DeviceLocalAccountExtensionTracker : public CloudPolicyStore::Observer { | 19 class DeviceLocalAccountExtensionTracker : public CloudPolicyStore::Observer { |
20 public: | 20 public: |
21 DeviceLocalAccountExtensionTracker( | 21 DeviceLocalAccountExtensionTracker( |
22 const DeviceLocalAccount& account, | 22 const DeviceLocalAccount& account, |
23 CloudPolicyStore* store, | 23 CloudPolicyStore* store, |
24 SchemaRegistry* schema_registry); | 24 SchemaRegistry* schema_registry); |
25 | 25 |
26 virtual ~DeviceLocalAccountExtensionTracker(); | 26 virtual ~DeviceLocalAccountExtensionTracker(); |
27 | 27 |
28 // CloudPolicyStore::Observer: | 28 // CloudPolicyStore::Observer: |
29 virtual void OnStoreLoaded(CloudPolicyStore* store) OVERRIDE; | 29 virtual void OnStoreLoaded(CloudPolicyStore* store) override; |
30 virtual void OnStoreError(CloudPolicyStore* store) OVERRIDE; | 30 virtual void OnStoreError(CloudPolicyStore* store) override; |
31 | 31 |
32 private: | 32 private: |
33 void UpdateFromStore(); | 33 void UpdateFromStore(); |
34 | 34 |
35 CloudPolicyStore* store_; | 35 CloudPolicyStore* store_; |
36 SchemaRegistry* schema_registry_; | 36 SchemaRegistry* schema_registry_; |
37 | 37 |
38 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountExtensionTracker); | 38 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountExtensionTracker); |
39 }; | 39 }; |
40 | 40 |
41 } // namespace policy | 41 } // namespace policy |
42 | 42 |
43 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTENSION_TRACKER
_H_ | 43 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_EXTENSION_TRACKER
_H_ |
OLD | NEW |