| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_MANAGEMENT_POLICY_CACHE_H_ | 5 #ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_CACHE_H_ |
| 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_CACHE_H_ | 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_CACHE_H_ |
| 7 | 7 |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/lock.h" | 10 #include "base/lock.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 void LoadPolicyFromFile(); | 35 void LoadPolicyFromFile(); |
| 36 | 36 |
| 37 // Resets the policy information. Returns true if the new policy is different | 37 // Resets the policy information. Returns true if the new policy is different |
| 38 // from the previously stored policy. | 38 // from the previously stored policy. |
| 39 bool SetPolicy(const em::DevicePolicyResponse& policy); | 39 bool SetPolicy(const em::DevicePolicyResponse& policy); |
| 40 | 40 |
| 41 // Gets the policy information. Ownership of the return value is transferred | 41 // Gets the policy information. Ownership of the return value is transferred |
| 42 // to the caller. | 42 // to the caller. |
| 43 DictionaryValue* GetPolicy(); | 43 DictionaryValue* GetPolicy(); |
| 44 | 44 |
| 45 void SetDeviceUnmanaged(bool is_device_unmanaged); | 45 void SetDeviceUnmanaged(); |
| 46 bool is_device_unmanaged() const { | 46 bool is_device_unmanaged() const { |
| 47 return is_device_unmanaged_; | 47 return is_device_unmanaged_; |
| 48 } | 48 } |
| 49 | 49 |
| 50 // Returns the time as which the policy was last fetched. | 50 // Returns the time as which the policy was last fetched. |
| 51 base::Time last_policy_refresh_time() const { | 51 base::Time last_policy_refresh_time() const { |
| 52 return last_policy_refresh_time_; | 52 return last_policy_refresh_time_; |
| 53 } | 53 } |
| 54 | 54 |
| 55 private: | 55 private: |
| (...skipping 29 matching lines...) Expand all Loading... |
| 85 | 85 |
| 86 bool is_device_unmanaged_; | 86 bool is_device_unmanaged_; |
| 87 | 87 |
| 88 // The time at which the policy was last refreshed. | 88 // The time at which the policy was last refreshed. |
| 89 base::Time last_policy_refresh_time_; | 89 base::Time last_policy_refresh_time_; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace policy | 92 } // namespace policy |
| 93 | 93 |
| 94 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_CACHE_H_ | 94 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_CACHE_H_ |
| OLD | NEW |