OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ |
6 #define CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ | 6 #define CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 chromeos::SessionManagerClient* session_manager_client, | 36 chromeos::SessionManagerClient* session_manager_client, |
37 const FilePath& legacy_token_cache_file, | 37 const FilePath& legacy_token_cache_file, |
38 const FilePath& legacy_policy_cache_file); | 38 const FilePath& legacy_policy_cache_file); |
39 virtual ~UserCloudPolicyStoreChromeOS(); | 39 virtual ~UserCloudPolicyStoreChromeOS(); |
40 | 40 |
41 // CloudPolicyStore: | 41 // CloudPolicyStore: |
42 virtual void Store( | 42 virtual void Store( |
43 const enterprise_management::PolicyFetchResponse& policy) OVERRIDE; | 43 const enterprise_management::PolicyFetchResponse& policy) OVERRIDE; |
44 virtual void Load() OVERRIDE; | 44 virtual void Load() OVERRIDE; |
45 | 45 |
46 protected: | |
47 virtual void RemoveStoredPolicy() OVERRIDE; | |
48 | |
49 private: | 46 private: |
50 // Called back from SessionManagerClient for policy load operations. | 47 // Called back from SessionManagerClient for policy load operations. |
51 void OnPolicyRetrieved(const std::string& policy_blob); | 48 void OnPolicyRetrieved(const std::string& policy_blob); |
52 | 49 |
53 // Completion handler for policy validation on the Load() path. Installs the | 50 // Completion handler for policy validation on the Load() path. Installs the |
54 // policy and publishes it if validation succeeded. | 51 // policy and publishes it if validation succeeded. |
55 void OnRetrievedPolicyValidated(UserCloudPolicyValidator* validator); | 52 void OnRetrievedPolicyValidated(UserCloudPolicyValidator* validator); |
56 | 53 |
57 // Completion handler for policy validation on the Load() path. Starts a store | 54 // Completion handler for policy validation on the Load() path. Starts a store |
58 // operation if the validation succeeded. | 55 // operation if the validation succeeded. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 FilePath legacy_cache_dir_; | 91 FilePath legacy_cache_dir_; |
95 scoped_ptr<LegacyPolicyCacheLoader> legacy_loader_; | 92 scoped_ptr<LegacyPolicyCacheLoader> legacy_loader_; |
96 bool legacy_caches_loaded_; | 93 bool legacy_caches_loaded_; |
97 | 94 |
98 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreChromeOS); | 95 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreChromeOS); |
99 }; | 96 }; |
100 | 97 |
101 } // namespace policy | 98 } // namespace policy |
102 | 99 |
103 #endif // CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ | 100 #endif // CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ |
OLD | NEW |