| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_POLICY_DEVICE_POLICY_CACHE_H_ | 5 #ifndef CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_ |
| 6 #define CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_ | 6 #define CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 public chromeos::SignedSettingsHelper::Callback { | 28 public chromeos::SignedSettingsHelper::Callback { |
| 29 public: | 29 public: |
| 30 explicit DevicePolicyCache(DevicePolicyIdentityStrategy* identity_strategy, | 30 explicit DevicePolicyCache(DevicePolicyIdentityStrategy* identity_strategy, |
| 31 EnterpriseInstallAttributes* install_attributes); | 31 EnterpriseInstallAttributes* install_attributes); |
| 32 virtual ~DevicePolicyCache(); | 32 virtual ~DevicePolicyCache(); |
| 33 | 33 |
| 34 // CloudPolicyCacheBase implementation: | 34 // CloudPolicyCacheBase implementation: |
| 35 virtual void Load() OVERRIDE; | 35 virtual void Load() OVERRIDE; |
| 36 virtual void SetPolicy(const em::PolicyFetchResponse& policy) OVERRIDE; | 36 virtual void SetPolicy(const em::PolicyFetchResponse& policy) OVERRIDE; |
| 37 virtual void SetUnmanaged() OVERRIDE; | 37 virtual void SetUnmanaged() OVERRIDE; |
| 38 virtual bool IsReady() OVERRIDE; |
| 38 | 39 |
| 39 // SignedSettingsHelper::Callback implementation: | 40 // SignedSettingsHelper::Callback implementation: |
| 40 virtual void OnRetrievePolicyCompleted( | 41 virtual void OnRetrievePolicyCompleted( |
| 41 chromeos::SignedSettings::ReturnCode code, | 42 chromeos::SignedSettings::ReturnCode code, |
| 42 const em::PolicyFetchResponse& policy) OVERRIDE; | 43 const em::PolicyFetchResponse& policy) OVERRIDE; |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 friend class DevicePolicyCacheTest; | 46 friend class DevicePolicyCacheTest; |
| 46 | 47 |
| 47 // Alternate c'tor allowing tests to mock out the SignedSettingsHelper | 48 // Alternate c'tor allowing tests to mock out the SignedSettingsHelper |
| (...skipping 26 matching lines...) Expand all Loading... |
| 74 bool starting_up_; | 75 bool starting_up_; |
| 75 | 76 |
| 76 base::ScopedCallbackFactory<DevicePolicyCache> callback_factory_; | 77 base::ScopedCallbackFactory<DevicePolicyCache> callback_factory_; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(DevicePolicyCache); | 79 DISALLOW_COPY_AND_ASSIGN(DevicePolicyCache); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace policy | 82 } // namespace policy |
| 82 | 83 |
| 83 #endif // CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_ | 84 #endif // CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_ |
| OLD | NEW |