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 26 matching lines...) Expand all Loading... |
37 virtual ~DeviceLocalAccountPolicyProvider(); | 37 virtual ~DeviceLocalAccountPolicyProvider(); |
38 | 38 |
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 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE; | 47 virtual bool IsInitializationComplete(PolicyDomain domain) const override; |
48 virtual void RefreshPolicies() OVERRIDE; | 48 virtual void RefreshPolicies() override; |
49 | 49 |
50 // DeviceLocalAccountPolicyService::Observer: | 50 // DeviceLocalAccountPolicyService::Observer: |
51 virtual void OnPolicyUpdated(const std::string& user_id) OVERRIDE; | 51 virtual void OnPolicyUpdated(const std::string& user_id) override; |
52 virtual void OnDeviceLocalAccountsChanged() OVERRIDE; | 52 virtual void OnDeviceLocalAccountsChanged() override; |
53 | 53 |
54 private: | 54 private: |
55 // Returns the broker for |user_id_| or NULL if not available. | 55 // Returns the broker for |user_id_| or NULL if not available. |
56 DeviceLocalAccountPolicyBroker* GetBroker() const; | 56 DeviceLocalAccountPolicyBroker* GetBroker() const; |
57 | 57 |
58 // Handles completion of policy refreshes and triggers the update callback. | 58 // Handles completion of policy refreshes and triggers the update callback. |
59 // |success| is true if the policy refresh was successful. | 59 // |success| is true if the policy refresh was successful. |
60 void ReportPolicyRefresh(bool success); | 60 void ReportPolicyRefresh(bool success); |
61 | 61 |
62 // Unless |waiting_for_policy_refresh_|, calls UpdatePolicy(), using the | 62 // Unless |waiting_for_policy_refresh_|, calls UpdatePolicy(), using the |
(...skipping 14 matching lines...) Expand all Loading... |
77 bool waiting_for_policy_refresh_; | 77 bool waiting_for_policy_refresh_; |
78 | 78 |
79 base::WeakPtrFactory<DeviceLocalAccountPolicyProvider> weak_factory_; | 79 base::WeakPtrFactory<DeviceLocalAccountPolicyProvider> weak_factory_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyProvider); | 81 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyProvider); |
82 }; | 82 }; |
83 | 83 |
84 } // namespace policy | 84 } // namespace policy |
85 | 85 |
86 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H
_ | 86 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H
_ |
OLD | NEW |