| 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_SETTINGS_SESSION_MANAGER_OPERATION_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 // Validates device settings after retrieval from session_manager. | 111 // Validates device settings after retrieval from session_manager. |
| 112 void ValidateDeviceSettings(const std::string& policy_blob); | 112 void ValidateDeviceSettings(const std::string& policy_blob); |
| 113 | 113 |
| 114 // Extracts status and device settings from the validator and reports them. | 114 // Extracts status and device settings from the validator and reports them. |
| 115 void ReportValidatorStatus(policy::DeviceCloudPolicyValidator* validator); | 115 void ReportValidatorStatus(policy::DeviceCloudPolicyValidator* validator); |
| 116 | 116 |
| 117 SessionManagerClient* session_manager_client_; | 117 SessionManagerClient* session_manager_client_; |
| 118 scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_; | 118 scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_; |
| 119 | 119 |
| 120 base::WeakPtrFactory<SessionManagerOperation> weak_factory_; | |
| 121 | |
| 122 Callback callback_; | 120 Callback callback_; |
| 123 | 121 |
| 124 scoped_refptr<ownership::PublicKey> public_key_; | 122 scoped_refptr<ownership::PublicKey> public_key_; |
| 125 bool force_key_load_; | 123 bool force_key_load_; |
| 126 std::string username_; | 124 std::string username_; |
| 127 | 125 |
| 128 bool is_loading_; | 126 bool is_loading_; |
| 129 scoped_ptr<enterprise_management::PolicyData> policy_data_; | 127 scoped_ptr<enterprise_management::PolicyData> policy_data_; |
| 130 scoped_ptr<enterprise_management::ChromeDeviceSettingsProto> device_settings_; | 128 scoped_ptr<enterprise_management::ChromeDeviceSettingsProto> device_settings_; |
| 131 | 129 |
| 130 base::WeakPtrFactory<SessionManagerOperation> weak_factory_; |
| 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(SessionManagerOperation); | 132 DISALLOW_COPY_AND_ASSIGN(SessionManagerOperation); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 // This operation loads the public owner key from disk if appropriate, fetches | 135 // This operation loads the public owner key from disk if appropriate, fetches |
| 136 // the policy blob from session manager, and validates the loaded policy blob. | 136 // the policy blob from session manager, and validates the loaded policy blob. |
| 137 class LoadSettingsOperation : public SessionManagerOperation { | 137 class LoadSettingsOperation : public SessionManagerOperation { |
| 138 public: | 138 public: |
| 139 // Creates a new load operation. | 139 // Creates a new load operation. |
| 140 explicit LoadSettingsOperation(const Callback& callback); | 140 explicit LoadSettingsOperation(const Callback& callback); |
| 141 virtual ~LoadSettingsOperation(); | 141 virtual ~LoadSettingsOperation(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 scoped_ptr<enterprise_management::PolicyData> new_policy_; | 197 scoped_ptr<enterprise_management::PolicyData> new_policy_; |
| 198 | 198 |
| 199 base::WeakPtrFactory<SignAndStoreSettingsOperation> weak_factory_; | 199 base::WeakPtrFactory<SignAndStoreSettingsOperation> weak_factory_; |
| 200 | 200 |
| 201 DISALLOW_COPY_AND_ASSIGN(SignAndStoreSettingsOperation); | 201 DISALLOW_COPY_AND_ASSIGN(SignAndStoreSettingsOperation); |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 } // namespace chromeos | 204 } // namespace chromeos |
| 205 | 205 |
| 206 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ | 206 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ |
| OLD | NEW |