| 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 "base/memory/scoped_callback_factory.h" | 9 #include "base/memory/scoped_callback_factory.h" |
| 10 #include "chrome/browser/chromeos/login/signed_settings.h" | 10 #include "chrome/browser/chromeos/login/signed_settings.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 virtual void SetUnmanaged() OVERRIDE; | 35 virtual void SetUnmanaged() OVERRIDE; |
| 36 virtual bool IsReady() OVERRIDE; | 36 virtual bool IsReady() OVERRIDE; |
| 37 | 37 |
| 38 // SignedSettingsHelper::Callback implementation: | 38 // SignedSettingsHelper::Callback implementation: |
| 39 virtual void OnRetrievePolicyCompleted( | 39 virtual void OnRetrievePolicyCompleted( |
| 40 chromeos::SignedSettings::ReturnCode code, | 40 chromeos::SignedSettings::ReturnCode code, |
| 41 const em::PolicyFetchResponse& policy) OVERRIDE; | 41 const em::PolicyFetchResponse& policy) OVERRIDE; |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 friend class DevicePolicyCacheTest; | 44 friend class DevicePolicyCacheTest; |
| 45 friend class DevicePolicyCacheTestHelper; |
| 45 | 46 |
| 46 // Alternate c'tor allowing tests to mock out the SignedSettingsHelper | 47 // Alternate c'tor allowing tests to mock out the SignedSettingsHelper |
| 47 // singleton. | 48 // singleton. |
| 48 DevicePolicyCache( | 49 DevicePolicyCache( |
| 49 CloudPolicyDataStore* data_store, | 50 CloudPolicyDataStore* data_store, |
| 50 EnterpriseInstallAttributes* install_attributes, | 51 EnterpriseInstallAttributes* install_attributes, |
| 51 chromeos::SignedSettingsHelper* signed_settings_helper); | 52 chromeos::SignedSettingsHelper* signed_settings_helper); |
| 52 | 53 |
| 53 // CloudPolicyCacheBase implementation: | 54 // CloudPolicyCacheBase implementation: |
| 54 virtual bool DecodePolicyData(const em::PolicyData& policy_data, | 55 virtual bool DecodePolicyData(const em::PolicyData& policy_data, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 73 bool starting_up_; | 74 bool starting_up_; |
| 74 | 75 |
| 75 base::ScopedCallbackFactory<DevicePolicyCache> callback_factory_; | 76 base::ScopedCallbackFactory<DevicePolicyCache> callback_factory_; |
| 76 | 77 |
| 77 DISALLOW_COPY_AND_ASSIGN(DevicePolicyCache); | 78 DISALLOW_COPY_AND_ASSIGN(DevicePolicyCache); |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace policy | 81 } // namespace policy |
| 81 | 82 |
| 82 #endif // CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_ | 83 #endif // CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_ |
| OLD | NEW |