Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_POLICY_USER_POLICY_CACHE_H_ | |
| 6 #define CHROME_BROWSER_POLICY_USER_POLICY_CACHE_H_ | |
|
Mattias Nissler (ping if slow)
2011/03/24 18:55:57
#pragma once (also check other files please)
Jakob Kummerow
2011/03/28 13:53:53
Done.
| |
| 7 | |
| 8 #include "base/file_path.h" | |
| 9 #include "chrome/browser/policy/cloud_policy_cache_base.h" | |
| 10 | |
| 11 namespace policy { | |
| 12 | |
| 13 // CloudPolicyCacheBase implementation that persists policy information | |
| 14 // into the file specified by the c'tor parameter |backing_file_path|. | |
| 15 class UserPolicyCache : public CloudPolicyCacheBase { | |
| 16 public: | |
| 17 explicit UserPolicyCache(const FilePath& backing_file_path); | |
| 18 virtual ~UserPolicyCache(); | |
| 19 | |
| 20 // CloudPolicyCacheBase implementation: | |
| 21 virtual void Load(); | |
|
Mattias Nissler (ping if slow)
2011/03/24 18:55:57
Consider adding OVERRIDE declarations
Jakob Kummerow
2011/03/28 13:53:53
Done.
| |
| 22 virtual void SetPolicy(const em::PolicyFetchResponse& policy); | |
| 23 virtual void SetUnmanaged(); | |
| 24 | |
| 25 private: | |
| 26 void PersistPolicy(const em::PolicyFetchResponse& policy, | |
| 27 const base::Time& timestamp); | |
| 28 | |
|
Mattias Nissler (ping if slow)
2011/03/24 18:55:57
// CloudPolicyCacheBase implementation:
Jakob Kummerow
2011/03/28 13:53:53
Done.
| |
| 29 virtual bool DecodePolicyData(const em::PolicyData& policy_data, | |
| 30 PolicyMap* mandatory, | |
| 31 PolicyMap* recommended); | |
|
Mattias Nissler (ping if slow)
2011/03/24 18:55:57
OVERRIDE?
Jakob Kummerow
2011/03/28 13:53:53
Done.
| |
| 32 | |
| 33 // The file in which we store a cached version of the policy information. | |
| 34 const FilePath backing_file_path_; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(UserPolicyCache); | |
| 37 }; | |
| 38 | |
| 39 } // namespace policy | |
| 40 | |
| 41 #endif // CHROME_BROWSER_POLICY_USER_POLICY_CACHE_H_ | |
| OLD | NEW |