| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CLOUD_EXTERNAL_DATA_POLICY_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_POLICY_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_POLICY_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_POLICY_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 DeviceLocalAccountPolicyService* device_local_account_policy_service, | 62 DeviceLocalAccountPolicyService* device_local_account_policy_service, |
| 63 const std::string& policy, | 63 const std::string& policy, |
| 64 Delegate* delegate); | 64 Delegate* delegate); |
| 65 virtual ~CloudExternalDataPolicyObserver(); | 65 virtual ~CloudExternalDataPolicyObserver(); |
| 66 | 66 |
| 67 void Init(); | 67 void Init(); |
| 68 | 68 |
| 69 // content::NotificationObserver: | 69 // content::NotificationObserver: |
| 70 virtual void Observe(int type, | 70 virtual void Observe(int type, |
| 71 const content::NotificationSource& source, | 71 const content::NotificationSource& source, |
| 72 const content::NotificationDetails& details) OVERRIDE; | 72 const content::NotificationDetails& details) override; |
| 73 | 73 |
| 74 // DeviceLocalAccountPolicyService::Observer: | 74 // DeviceLocalAccountPolicyService::Observer: |
| 75 virtual void OnPolicyUpdated(const std::string& user_id) OVERRIDE; | 75 virtual void OnPolicyUpdated(const std::string& user_id) override; |
| 76 virtual void OnDeviceLocalAccountsChanged() OVERRIDE; | 76 virtual void OnDeviceLocalAccountsChanged() override; |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 // Helper class that observes |policy_| for a logged-in user. | 79 // Helper class that observes |policy_| for a logged-in user. |
| 80 class PolicyServiceObserver; | 80 class PolicyServiceObserver; |
| 81 | 81 |
| 82 void RetrieveDeviceLocalAccounts(); | 82 void RetrieveDeviceLocalAccounts(); |
| 83 | 83 |
| 84 // Handles the new policy map |entry| for |user_id| by canceling any external | 84 // Handles the new policy map |entry| for |user_id| by canceling any external |
| 85 // data fetch currently in progress, emitting a notification that an external | 85 // data fetch currently in progress, emitting a notification that an external |
| 86 // data reference has been cleared (if |entry| is NULL) or set (otherwise), | 86 // data reference has been cleared (if |entry| is NULL) or set (otherwise), |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 FetchWeakPtrMap fetch_weak_ptrs_; | 123 FetchWeakPtrMap fetch_weak_ptrs_; |
| 124 | 124 |
| 125 base::WeakPtrFactory<CloudExternalDataPolicyObserver> weak_factory_; | 125 base::WeakPtrFactory<CloudExternalDataPolicyObserver> weak_factory_; |
| 126 | 126 |
| 127 DISALLOW_COPY_AND_ASSIGN(CloudExternalDataPolicyObserver); | 127 DISALLOW_COPY_AND_ASSIGN(CloudExternalDataPolicyObserver); |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 } // namespace policy | 130 } // namespace policy |
| 131 | 131 |
| 132 #endif // CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_POLICY_OBSERVER_H_ | 132 #endif // CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_POLICY_OBSERVER_H_ |
| OLD | NEW |