Chromium Code Reviews| 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_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 // Completion handler for policy validation on the Store() path. | 66 // Completion handler for policy validation on the Store() path. |
| 67 // Starts a store operation if the validation succeeded. | 67 // Starts a store operation if the validation succeeded. |
| 68 void OnPolicyToStoreValidated(UserCloudPolicyValidator* validator); | 68 void OnPolicyToStoreValidated(UserCloudPolicyValidator* validator); |
| 69 | 69 |
| 70 // Called back from SessionManagerClient for policy store operations. | 70 // Called back from SessionManagerClient for policy store operations. |
| 71 void OnPolicyStored(bool success); | 71 void OnPolicyStored(bool success); |
| 72 | 72 |
| 73 // Called back from SessionManagerClient for policy load operations. | 73 // Called back from SessionManagerClient for policy load operations. |
| 74 void OnPolicyRetrieved(const std::string& policy_blob); | 74 void OnPolicyRetrieved(const std::string& policy_blob); |
| 75 | 75 |
| 76 void OnPolicyRetrievedWithError(const std::string& error_name, | |
|
Daniel Erat
2017/04/10 18:59:26
please add a comment documenting what calls this a
igorcov
2017/04/18 10:23:18
Done.
| |
| 77 const std::string& error_message); | |
| 78 | |
| 76 // Starts validation of the loaded |policy| before installing it. | 79 // Starts validation of the loaded |policy| before installing it. |
| 77 void ValidateRetrievedPolicy( | 80 void ValidateRetrievedPolicy( |
| 78 std::unique_ptr<enterprise_management::PolicyFetchResponse> policy); | 81 std::unique_ptr<enterprise_management::PolicyFetchResponse> policy); |
| 79 | 82 |
| 80 // Completion handler for policy validation on the Load() path. Installs the | 83 // Completion handler for policy validation on the Load() path. Installs the |
| 81 // policy and publishes it if validation succeeded. | 84 // policy and publishes it if validation succeeded. |
| 82 void OnRetrievedPolicyValidated(UserCloudPolicyValidator* validator); | 85 void OnRetrievedPolicyValidated(UserCloudPolicyValidator* validator); |
| 83 | 86 |
| 84 // Invokes |callback| after reloading |policy_key_|. | 87 // Invokes |callback| after reloading |policy_key_|. |
| 85 void ReloadPolicyKey(const base::Closure& callback); | 88 void ReloadPolicyKey(const base::Closure& callback); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 base::FilePath cached_policy_key_path_; | 123 base::FilePath cached_policy_key_path_; |
| 121 | 124 |
| 122 base::WeakPtrFactory<UserCloudPolicyStoreChromeOS> weak_factory_; | 125 base::WeakPtrFactory<UserCloudPolicyStoreChromeOS> weak_factory_; |
| 123 | 126 |
| 124 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreChromeOS); | 127 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreChromeOS); |
| 125 }; | 128 }; |
| 126 | 129 |
| 127 } // namespace policy | 130 } // namespace policy |
| 128 | 131 |
| 129 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ | 132 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_STORE_CHROMEOS_H_ |
| OLD | NEW |