| 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 29 matching lines...) Expand all Loading... |
| 40 chromeos::SessionManagerClient* session_manager_client, | 40 chromeos::SessionManagerClient* session_manager_client, |
| 41 const FilePath& legacy_token_cache_file, | 41 const FilePath& legacy_token_cache_file, |
| 42 const FilePath& legacy_policy_cache_file); | 42 const FilePath& legacy_policy_cache_file); |
| 43 virtual ~UserCloudPolicyStoreChromeOS(); | 43 virtual ~UserCloudPolicyStoreChromeOS(); |
| 44 | 44 |
| 45 // CloudPolicyStore: | 45 // CloudPolicyStore: |
| 46 virtual void Store( | 46 virtual void Store( |
| 47 const enterprise_management::PolicyFetchResponse& policy) OVERRIDE; | 47 const enterprise_management::PolicyFetchResponse& policy) OVERRIDE; |
| 48 virtual void Load() OVERRIDE; | 48 virtual void Load() OVERRIDE; |
| 49 | 49 |
| 50 protected: | |
| 51 virtual void RemoveStoredPolicy() OVERRIDE; | |
| 52 | |
| 53 private: | 50 private: |
| 54 // Called back from SessionManagerClient for policy load operations. | 51 // Called back from SessionManagerClient for policy load operations. |
| 55 void OnPolicyRetrieved(const std::string& policy_blob); | 52 void OnPolicyRetrieved(const std::string& policy_blob); |
| 56 | 53 |
| 57 // Completion handler for policy validation on the Load() path. Installs the | 54 // Completion handler for policy validation on the Load() path. Installs the |
| 58 // policy and publishes it if validation succeeded. | 55 // policy and publishes it if validation succeeded. |
| 59 void OnRetrievedPolicyValidated(UserCloudPolicyValidator* validator); | 56 void OnRetrievedPolicyValidated(UserCloudPolicyValidator* validator); |
| 60 | 57 |
| 61 // Completion handler for policy validation on the Load() path. Starts a store | 58 // Completion handler for policy validation on the Load() path. Starts a store |
| 62 // operation if the validation succeeded. | 59 // operation if the validation succeeded. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 FilePath legacy_cache_dir_; | 95 FilePath legacy_cache_dir_; |
| 99 scoped_ptr<LegacyPolicyCacheLoader> legacy_loader_; | 96 scoped_ptr<LegacyPolicyCacheLoader> legacy_loader_; |
| 100 bool legacy_caches_loaded_; | 97 bool legacy_caches_loaded_; |
| 101 | 98 |
| 102 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreChromeOS); | 99 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreChromeOS); |
| 103 }; | 100 }; |
| 104 | 101 |
| 105 } // namespace policy | 102 } // namespace policy |
| 106 | 103 |
| 107 #endif // CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ | 104 #endif // CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ |
| OLD | NEW |