OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_POLICY_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 28 matching lines...) Expand all Loading... | |
39 // Factory function to create and initialize a provider for |user_id|. Returns | 39 // Factory function to create and initialize a provider for |user_id|. Returns |
40 // NULL if |user_id| is not a device-local account or user policy isn't | 40 // NULL if |user_id| is not a device-local account or user policy isn't |
41 // applicable for user_id's user type. | 41 // applicable for user_id's user type. |
42 static scoped_ptr<DeviceLocalAccountPolicyProvider> Create( | 42 static scoped_ptr<DeviceLocalAccountPolicyProvider> Create( |
43 const std::string& user_id, | 43 const std::string& user_id, |
44 DeviceLocalAccountPolicyService* service); | 44 DeviceLocalAccountPolicyService* service); |
45 | 45 |
46 // ConfigurationPolicyProvider: | 46 // ConfigurationPolicyProvider: |
47 bool IsInitializationComplete(PolicyDomain domain) const override; | 47 bool IsInitializationComplete(PolicyDomain domain) const override; |
48 void RefreshPolicies() override; | 48 void RefreshPolicies() override; |
49 PolicySource source() const override; | |
Thiemo Nagel
2015/09/01 17:40:35
Remove.
fhorschig
2015/09/04 06:53:53
Done.
| |
49 | 50 |
50 // DeviceLocalAccountPolicyService::Observer: | 51 // DeviceLocalAccountPolicyService::Observer: |
51 void OnPolicyUpdated(const std::string& user_id) override; | 52 void OnPolicyUpdated(const std::string& user_id) override; |
52 void OnDeviceLocalAccountsChanged() override; | 53 void OnDeviceLocalAccountsChanged() override; |
53 | 54 |
54 private: | 55 private: |
55 // Returns the broker for |user_id_| or NULL if not available. | 56 // Returns the broker for |user_id_| or NULL if not available. |
56 DeviceLocalAccountPolicyBroker* GetBroker() const; | 57 DeviceLocalAccountPolicyBroker* GetBroker() const; |
57 | 58 |
58 // Handles completion of policy refreshes and triggers the update callback. | 59 // Handles completion of policy refreshes and triggers the update callback. |
(...skipping 18 matching lines...) Expand all Loading... | |
77 bool waiting_for_policy_refresh_; | 78 bool waiting_for_policy_refresh_; |
78 | 79 |
79 base::WeakPtrFactory<DeviceLocalAccountPolicyProvider> weak_factory_; | 80 base::WeakPtrFactory<DeviceLocalAccountPolicyProvider> weak_factory_; |
80 | 81 |
81 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyProvider); | 82 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyProvider); |
82 }; | 83 }; |
83 | 84 |
84 } // namespace policy | 85 } // namespace policy |
85 | 86 |
86 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H _ | 87 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H _ |
OLD | NEW |